|
|
|
|||||
|
Ice 3.0.1 & Visual Studio 2005 (Express edition)
Hello,
I tried to move my development from linux to windows in order to work with another C++ IDE than suits better my needs than KDevelop (except Eclipse), and I'm using the new Visual Studio 2005 express edition, that is free of charge. With the package downladable from the ZeroC website, with all the PATH set properly and with the right directories set in the properties of VS, I'm able to compile without errors all the demos included in the package. The problem comes when I want to create a new project for example called ChatClient, which has the same sources as ChatC just to learn the usage of VS with Ice. Consider that the "Custom build step" for the file .ice is correctly set. In the linking phase I get this kind of error (several times): Client.obj : error LNK2005: "void __cdecl IceInternal::incRef(class Demo::ChatCallback *)" (?incRef@IceInternal@@YAXPAVChatCallback@Demo@@@Z) already defined in Chat.obj ...and these errors (again...several times): Chat.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall IceProxy::Glacier2::Session::Session(void)" (__imp_??0Session@Glacier2@IceProxy@@QAE@XZ) referenced in function "public: __thiscall IceProxy::Demo::ChatSession::ChatSession(void)" (??0ChatSession@Demo@IceProxy@@QAE@XZ) Client.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall IceProxy::Glacier2::Session::Session(void)" (__imp_??0Session@Glacier2@IceProxy@@QAE@XZ) What are the causes of these errors? I have followed the instructions presented in this post: Compiling slice2cpp-generated-code on Win. XP Pro Thank you in advance With my very best regards Alberto
__________________
Alberto Della Santina IT Engineering Department University of Pisa (Italy) www.ing.unipi.it www.iet.unipi.it |
|
|||||
|
Hi Bernard,
thank you very much for your quick reply to my post. Unfortunately the MultiThreaded Debug is properly set, using the Iced.lib IceUtild.lib libraries, I can't figure out where is the problem. You will find attached the project file (compressed). Where sould I specify the link to the glacier2.lib? Thank you Cheers Alberto
__________________
Alberto Della Santina IT Engineering Department University of Pisa (Italy) www.ing.unipi.it www.iet.unipi.it |
|
||||||
|
Hi Alberto,
Please try to set Configuration Properties/C/C++/Language/Enable Run-Time Type Info to Yes 'Yes' should be the default, but I don't see anything else suspicious in your project file. Don't forget to rebuild your application afterwards. You also need to add 'glacier2d.lib' [debug] or 'glacier2.lib' [release] to Configuration Properties/Linker/Input/Additional dependencies. Cheers, Bernard |
|
|||||
|
Dear Bernard,
sorry for the inconvenience! I've resolved everything! It was just a mispelling... Thanks a lot for your help! Do I have to include only the needed libraries for the project? For example: this one needs: Iced.lib IceUtild.lib glacier2d.lib In the case I would include all of them for a "simple" project like this, will I experience a big loss of performance? I'm asking this just not to remember to take care also of the properties of the project when I will write some more complicate source codes. Thanks again Sincerely Alberto With my very best regards
__________________
Alberto Della Santina IT Engineering Department University of Pisa (Italy) www.ing.unipi.it www.iet.unipi.it |
|
||||||
|
Hi Alberto,
Glad to hear you figured it out! You can list as many libraries as you like: Visual C++ will only use the ones it needs: there is no downside. However this is not true on all platforms; for example on Linux and Solaris, you'd better link with only the libraries you need. Cheers, Bernard |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem building IceSSL for CS with Visual Studio 2005 | Vivien Delage | Help Center | 4 | 11-28-2006 09:55 AM |
| Visual Studio 2005 C# ICE Issues | jborg | Bug Reports | 3 | 12-23-2005 06:42 PM |
| IceE1.0.0 on Visual C++ 2005 | hgp | Help Center | 3 | 12-02-2005 12:14 PM |
| C# samples all throw exceptions on VS.Net 2005 express | Leaf | Help Center | 2 | 10-09-2004 10:18 PM |
| Visual studio net | xdm | Help Center | 1 | 02-06-2004 10:56 PM |