Export DLL. No such file.

in Help Center
Hi,
I've a VS2010 solution within 3 projects.
Two of them are the client and server of an Ice solution, with an auto-generated .cpp and .h from Slice compilation. Those projects generate two DLL's wich are used in the third project (Main).
But when I import them, there is an error in file Imagen.h (generated from Imagen.ice Slice file).
It can't find the directory of Ice headers.
This is the error 3>c:\users\...\proyecto\cliente\cliente\Imagen.h(24): fatal error C1083: No se puede abrir el archivo incluir: 'Ice/LocalObjectF.h': No such file or directory
The properties are the same both client and server project. Include directories, libs, etc.
Client can't compile while server does. Ice is enabled in client and server projects, but isn't in Main project because it generates more errors and I think isn't necessary, there I'm just calling functions from DLL's.
Any idea?
Thanks!
I've a VS2010 solution within 3 projects.
Two of them are the client and server of an Ice solution, with an auto-generated .cpp and .h from Slice compilation. Those projects generate two DLL's wich are used in the third project (Main).
But when I import them, there is an error in file Imagen.h (generated from Imagen.ice Slice file).
It can't find the directory of Ice headers.
This is the error 3>c:\users\...\proyecto\cliente\cliente\Imagen.h(24): fatal error C1083: No se puede abrir el archivo incluir: 'Ice/LocalObjectF.h': No such file or directory
The properties are the same both client and server project. Include directories, libs, etc.
Client can't compile while server does. Ice is enabled in client and server projects, but isn't in Main project because it generates more errors and I think isn't necessary, there I'm just calling functions from DLL's.
Any idea?
Thanks!
0
Comments
Isn't clear where this error come from, it seems that your "Main" project include "Image.h" ? and that it doesn't found Ice headers? if that is the case you must enable "Slice builder" in "Main" project and doing so the plug-in will add Ice library and header directories to your project.
What other errors do you see when you enabled "Slice builder" in "Main" project?
Bests regards,
Jose
I have Imagen.ice in project Client and Server. It compiles automatically in both projects and generates .cpp and .h
Then generates 2 DLL's, Client.dll and Server.dll to be used by Main project. Here I don't need Imagen.h because I'm calling functions from dll's.
If I enable Slice compiler in Main project all errors are "new definition of class".
Can you attach a demo project that reproduce your problem? I will take a look at it.
Regards,
Jose
It seems it has been solved. The Ice directory was wrongly typed in Additional directories include in Main project.
But now I have many other errors. All of these are "new definitions of class" in one of the Imagen.h files.
Each project (client and server) must have a Imagen.h file and when I export them to the Main project it seems its duplicated.
In Cliente directory there are:
Imagen.cpp, Imagen.h, Imagen.ice, Cliente.h, Cliente.cpp
In Servidor directory:
Imagen.cpp, Imagen.h, Imagen.ice, Servidor.h, Servidor.cpp
I want, e.g, to include just Cliente.h, Cliente.cpp from Cliente and include all files from Servidor.
Thanks !
If you use different "--include-dir" options for compiling client/server Image.ice this will not work.
See also How do I use slice2cpp
Note that loading Client Server dlls in main Project will in general not work. As Client and Server projects define same generated classes and that will cause problems, in that case will be better to put common classes in a Common.dll that both projects use.
In ICE way I declare this functions
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
If I use _declspec(dllexport) instead of ICE errors are the same
I don't know what can I do and I'm fighting with this for a month :mad: