Click here to Skip to main content
16,011,955 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralVS6 and VS7(.NET) Pin
ns1-Oct-02 6:17
ns1-Oct-02 6:17 
GeneralRe: VS6 and VS7(.NET) Pin
Jeremy Falcon1-Oct-02 6:55
professionalJeremy Falcon1-Oct-02 6:55 
GeneralRe: VS6 and VS7(.NET) Pin
ns1-Oct-02 6:58
ns1-Oct-02 6:58 
GeneralRe: VS6 and VS7(.NET) Pin
Mariusz Popiolek1-Oct-02 7:01
sussMariusz Popiolek1-Oct-02 7:01 
GeneralRe: VS6 and VS7(.NET) Pin
ns1-Oct-02 7:00
ns1-Oct-02 7:00 
GeneralRe: VS6 and VS7(.NET) Pin
Mariusz Popiolek1-Oct-02 7:28
sussMariusz Popiolek1-Oct-02 7:28 
GeneralRe: VS6 and VS7(.NET) Pin
ns1-Oct-02 7:28
ns1-Oct-02 7:28 
GeneralExporting & using static public data members between dlls Pin
mabotta1-Oct-02 6:14
mabotta1-Oct-02 6:14 
Hi,
I have a VC++ project;

I have a dll with several classes that I export (one of them is this one, with static members declared in a header file and initialized in it’s .cpp file), and I’m using them from another dll. For the other classes I had no troubles (I included the header files and used them normally) but I don’t know what happens with this one.

When I see the dll’s depends it’s all ok; I can see the class and its attributes, but when I try to use it from another dll (like className::attributeName ), at linking time, I got an ‘unresolved external symbol’ error, but it compiles well.

I’ve tried:
- Include the class header file with __declspec(dllimport) in the dll that uses it
At linking time returns ‘error LNK2001: unresolved external symbol’

- Make a header file with extern sentence ( extern string className::attributeName; );
At compiling time returns: file.h(53) : error C2720: [attributeName] : 'extern ' storage-class specifier illegal on members

- The same header file, but with extern “C” sentence
( extern “C” string className::attributeName )
At linking time return:
file.obj : warning LNK4006: "public: static class string className::attributeName already defined in file2.obj; second definition ignored

Can someone help me to resolve this?
Thanks


Paranoico? yo???
GeneralRe: Exporting & using static public data members between dlls Pin
Tomasz Sowinski1-Oct-02 6:27
Tomasz Sowinski1-Oct-02 6:27 
GeneralRe: Exporting & using static public data members between dlls Pin
mabotta1-Oct-02 7:53
mabotta1-Oct-02 7:53 
GeneralAnother checkbox question.... Pin
ns1-Oct-02 5:59
ns1-Oct-02 5:59 
GeneralRe: Another checkbox question.... Pin
Tomasz Sowinski1-Oct-02 6:02
Tomasz Sowinski1-Oct-02 6:02 
Generalokay! Pin
ns1-Oct-02 6:09
ns1-Oct-02 6:09 
Generalmy checkbox wont check!! Pin
ns1-Oct-02 5:34
ns1-Oct-02 5:34 
GeneralRe: my checkbox wont check!! Pin
jmkhael1-Oct-02 5:36
jmkhael1-Oct-02 5:36 
GeneralRe: my checkbox wont check!! Pin
Le centriste1-Oct-02 5:36
Le centriste1-Oct-02 5:36 
GeneralRe: my checkbox wont check!! Pin
ns1-Oct-02 5:40
ns1-Oct-02 5:40 
GeneralRe: my checkbox wont check!! Pin
Tomasz Sowinski1-Oct-02 5:41
Tomasz Sowinski1-Oct-02 5:41 
GeneralRe: my checkbox wont check!! Pin
ns1-Oct-02 5:41
ns1-Oct-02 5:41 
GeneralRe: my checkbox wont check!! Pin
Tomasz Sowinski1-Oct-02 5:47
Tomasz Sowinski1-Oct-02 5:47 
Generalthanks!! Pin
ns1-Oct-02 5:48
ns1-Oct-02 5:48 
GeneralRe: thanks!! Pin
Le centriste1-Oct-02 5:50
Le centriste1-Oct-02 5:50 
QuestionHow do i make a Radio Button set at runtime? Pin
Anonymous1-Oct-02 5:31
Anonymous1-Oct-02 5:31 
AnswerRe: How do i make a Radio Button set at runtime? Pin
jmkhael1-Oct-02 5:34
jmkhael1-Oct-02 5:34 
GeneralRe: How do i make a Radio Button set at runtime? Pin
Anonymous1-Oct-02 5:53
Anonymous1-Oct-02 5:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.