[SOLVED] Issue when using class created with my Dll
-
With an empty class, I have the same issue :
- #ifndef EI_H
#define EI_H
class EI
{
public:
EI();
~EI();
};#endif // EI_H
main.obj:-1: erreur : LNK2019: unresolved external symbol "public: __cdecl EI::EI(void)" (??0EI@@QEAA@XZ) referenced in function main
With this :
#ifndef EI_H
#define EI_H#include "obo_global.h"
class OBOSHARED_EXPORT EI
{
public:
EI();
~EI();
};#endif // EI_H
same error :(
- #ifndef EI_H
-
I mean the implementation of El.
Can you post the crash dump?
-
After some clean, good news, I have a new mistake when I add OB0SHARED_EXPORT for the EI class:
main.obj:-1: erreur : LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl EI::EI(void)" (_imp??0EI@@QEAA@XZ) referenced in function main -
@mcosta I gave youi the implementation, I deleted all the methods, its an empty class with ctor and dtor only.
-
Sorry, if you don't show the code I can't help you!
-
@mcosta Please read my last answer ;)
-
So, now you have the link error or still the crash??
You said before you was able to compile and link but you get a crash and now again the link error. It's a little bit confusing
-
Now the crash ... Yes, its confusing for me too.
Thats looks so simple, I don't understand what I am doing wrong.
The crash means he cant find the EI cpp implementation at runtime. -
OMG!!!!! I am soooooo stupid ... I didn't update the copy of the Obo.dll .....
Sorry for your time mcosta !You gave me the right answer by adding OB0SHARED_EXPORT for the classes you need to use after ...
Thanks ! -
Ok, no problem!
Happy programming