I've implement both client and server in the same project and I've tried to export by different ways. Classic with "__declspec(dllexport)" and ICE with "ICE_DECLSPEC_EXPORT".
In ICE way I declare this functions
Code:
namespace Servidores {
class ImagenI : virtual public Proyecto::ImageProvider {
public:
ImageDataPtr* data;
ImageDescriptionPtr* descr;
bool primeraVez;
IplImage* imgAnterior;
char* puerto;
ImagenI(char puerto[]);
virtual Proyecto::ImageDataPtr getImageData(const Ice::Current& c);
virtual Proyecto::ImageDescriptionPtr getImageDescription(const Ice::Current& c);
virtual void sendImageData(const Proyecto::ImageDataPtr& im, const Ice::Current& c);
virtual void sendImageDescription(const Proyecto::ImageDescriptionPtr& im, const Ice::Current& c);
void pasaParam(const string& s, const Ice::Current&);
IplImage* restaImagenes(IplImage* imgActual);
ICE_DECLSPEC_EXPORT int run(char puerto[]);
};
class ServThreads : public IceUtil::Thread{
public:
ServThreads(char type[], char port[]);
virtual void run();
};
ICE_DECLSPEC_EXPORT int main(int argc, char *argv[]);
}
and it compiles and creates well .dll and .lib files.
But when I compile Main project using dll file, it returns many errors like those
Code:
Error 5 error LNK2001: símbolo externo "__declspec(dllimport) public: virtual __thiscall Ice::AdapterNotFoundException::~AdapterNotFoundException(void)" (__imp_??1AdapterNotFoundException@Ice@@UAE@XZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
Error 7 error LNK2001: símbolo externo "__declspec(dllimport) public: __thiscall IceInternal::FactoryTableInit::FactoryTableInit(void)" (__imp_??0FactoryTableInit@IceInternal@@QAE@XZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
Error 6 error LNK2001: símbolo externo "__declspec(dllimport) public: __thiscall IceInternal::FactoryTableInit::~FactoryTableInit(void)" (__imp_??1FactoryTableInit@IceInternal@@QAE@XZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
Error 10 error LNK2001: símbolo externo "__declspec(dllimport) public: __thiscall Ice::ConnectionInfo::ConnectionInfo(void)" (__imp_??0ConnectionInfo@Ice@@QAE@XZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
Error 8 error LNK2001: símbolo externo "__declspec(dllimport) public: __thiscall Ice::AdapterNotFoundException::AdapterNotFoundException(void)" (__imp_??0AdapterNotFoundException@Ice@@QAE@XZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
Error 9 error LNK2001: símbolo externo "__declspec(dllimport) protected: void __thiscall Ice::ConnectionInfo::`vbase destructor'(void)" (__imp_??_DConnectionInfo@Ice@@IAEXXZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
Error 11 error LNK1120: 6 externos sin resolver C:\Users\Cal30\Desktop\Proyecto\Servidor\Prueba\Main.exe
If I use _declspec(dllexport) instead of ICE errors are the same
Code:
Error 5 error LNK2001: símbolo externo "__declspec(dllimport) public: virtual __thiscall Ice::AdapterNotFoundException::~AdapterNotFoundException(void)" (__imp_??1AdapterNotFoundException@Ice@@UAE@XZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
Error 7 error LNK2001: símbolo externo "__declspec(dllimport) public: __thiscall IceInternal::FactoryTableInit::FactoryTableInit(void)" (__imp_??0FactoryTableInit@IceInternal@@QAE@XZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
Error 6 error LNK2001: símbolo externo "__declspec(dllimport) public: __thiscall IceInternal::FactoryTableInit::~FactoryTableInit(void)" (__imp_??1FactoryTableInit@IceInternal@@QAE@XZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
Error 10 error LNK2001: símbolo externo "__declspec(dllimport) public: __thiscall Ice::ConnectionInfo::ConnectionInfo(void)" (__imp_??0ConnectionInfo@Ice@@QAE@XZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
Error 8 error LNK2001: símbolo externo "__declspec(dllimport) public: __thiscall Ice::AdapterNotFoundException::AdapterNotFoundException(void)" (__imp_??0AdapterNotFoundException@Ice@@QAE@XZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
Error 9 error LNK2001: símbolo externo "__declspec(dllimport) protected: void __thiscall Ice::ConnectionInfo::`vbase destructor'(void)" (__imp_??_DConnectionInfo@Ice@@IAEXXZ) sin resolver C:\Users\Cal30\Desktop\Proyecto\Main\Main\Main.obj
I don't know what can I do and I'm fighting with this for a month