Re: export global variables in DLL

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Steffen Michael (steffen.michael_at_imms.de)
Date: 02/25/04


Date: Wed, 25 Feb 2004 12:52:15 +0200

I declared it in the dll- header file like
__declspec( dllexport) extern int IX;

After including the header-file in the exe I compiled the program
without errors, but I get a linker error like:
Not resolved external signal "int X"

thanks steffen

Steffen Michael schrieb:

> Hi,
> how I have to declare global variables in a dll for exporting?
> thanks,
> steffen



Relevant Pages

  • Re: keyword extern
    ... > Is it best to declare: ... > extern int a; ... > in a header file and include the header file in all files except ... The header should also be included in the definition source file. ...
    (comp.lang.c)
  • keyword extern
    ... What's the best way to use extern when using multiplefiles that is ... Is it best to declare: ... in a header file and include the header file in all files except ...
    (comp.lang.c)
  • Re: keyword extern
    ... > What's the best way to use extern when using multiplefiles that is ... > Is it best to declare: ... > extern int a; ... > in a header file and include the header file in all files except ...
    (comp.lang.c)
  • Re: extern char and include practices
    ... > Alright, i have some questions concerning include files en global ... The include file is used to specify the access allowed to the code ... > a global in main and then use extern int lines;? ... declare it as local to the logfunction. ...
    (comp.lang.c)
  • Re: Exported function mangaled name
    ... that header file; it must be declared as __declspec ... You have to declare the function the same way in your .cpp file as in ... #define LIBSPEC __declspec ... See my essay on The Ultimate DLL Header File on my MVP Tips site. ...
    (microsoft.public.vc.mfc)