Click here to Skip to main content
15,905,504 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Data Directory in PE file format Pin
sawerr2-Oct-06 1:48
sawerr2-Oct-06 1:48 
GeneralRe: Data Directory in PE file format Pin
Stephen Hewitt2-Oct-06 2:01
Stephen Hewitt2-Oct-06 2:01 
Questionunicode (urghh) and base64 Pin
Waldermort1-Oct-06 23:51
Waldermort1-Oct-06 23:51 
AnswerRe: unicode (urghh) and base64 Pin
kakan2-Oct-06 3:00
professionalkakan2-Oct-06 3:00 
AnswerRe: unicode (urghh) and base64 Pin
James Brown2-Oct-06 13:30
James Brown2-Oct-06 13:30 
Questionopengl problem Pin
Arif Liminto1-Oct-06 23:07
professionalArif Liminto1-Oct-06 23:07 
AnswerRe: opengl problem Pin
parths2-Oct-06 16:40
parths2-Oct-06 16:40 
AnswerRe: how to use a custom dll without lnk2019 Pin
Cedric Moonen1-Oct-06 22:56
Cedric Moonen1-Oct-06 22:56 
First, when you have an error, explain what it is (instead of saying error lnk2019). That way, we don't need to google to find what the exact error is.
Also, when posting coed, use the code tag so that your code will look better.

Now, to your question, I see several problems:
#ifdef MYDLL_EXPORTS<br />
#define MYDLL_EXPORTS __declspec(dllexport)<br />
#else<br />
#define MYDLL_EXPORTS __declspec(dllimport)<br />
#endif


What are you trying to do here ? Why do you use the same symbol (MYDLL_EXPORTS) ? You need to have two compiler flags: one to specify if symbols need to be exported or imported and the second that will contain the export or import directive. Something like that:

#ifdef ISDLL<br />
#define MYDLL_EXPORTS __declspec(dllexport)<br />
#else<br />
#define MYDLL_EXPORTS __declspec(dllimport)<br />
#endif


Then, you can add ISDLL in the compiler flag (project options) if you are compiling your dll.

You don't export anything also. Even if your flags were defined correctly, you still don't use them to export your classes.



Cédric Moonen
Software developer

Charting control [Updated - v1.1]

GeneralRe: how to use a custom dll without lnk2019 Pin
baharat1-Oct-06 23:31
baharat1-Oct-06 23:31 
GeneralRe: how to use a custom dll without lnk2019 Pin
Cedric Moonen2-Oct-06 1:13
Cedric Moonen2-Oct-06 1:13 
GeneralRe: how to use a custom dll without lnk2019 Pin
toxcct2-Oct-06 2:20
toxcct2-Oct-06 2:20 
GeneralRe: how to use a custom dll without lnk2019 Pin
Waldermort2-Oct-06 2:49
Waldermort2-Oct-06 2:49 
GeneralRe: how to use a custom dll without lnk2019 Pin
toxcct2-Oct-06 2:50
toxcct2-Oct-06 2:50 
Generalbrowse dialog box [modified] Pin
zon_cpp1-Oct-06 22:16
zon_cpp1-Oct-06 22:16 
GeneralRe: browse dialog box Pin
Waldermort1-Oct-06 22:28
Waldermort1-Oct-06 22:28 
GeneralRe: browse dialog box Pin
Hamid_RT2-Oct-06 0:06
Hamid_RT2-Oct-06 0:06 
GeneralRe: browse dialog box Pin
benjymous1-Oct-06 22:48
benjymous1-Oct-06 22:48 
Questionhelp: how to see library symbols Pin
Rostfrei1-Oct-06 22:16
Rostfrei1-Oct-06 22:16 
AnswerRe: help: how to see library symbols Pin
Waldermort1-Oct-06 22:29
Waldermort1-Oct-06 22:29 
AnswerRe: help: how to see library symbols Pin
Rostfrei1-Oct-06 23:25
Rostfrei1-Oct-06 23:25 
AnswerRe: help: how to see library symbols Pin
Stephen Hewitt2-Oct-06 0:36
Stephen Hewitt2-Oct-06 0:36 
GeneralRe: help: how to see library symbols Pin
Rostfrei2-Oct-06 1:24
Rostfrei2-Oct-06 1:24 
Questionserial port communication Pin
RockyJames1-Oct-06 21:16
RockyJames1-Oct-06 21:16 
AnswerRe: serial port communication Pin
Cedric Moonen1-Oct-06 22:08
Cedric Moonen1-Oct-06 22:08 
GeneralRe: serial port communication Pin
RockyJames1-Oct-06 22:15
RockyJames1-Oct-06 22:15 

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.