|
|
|
|||||
|
maybe it's wrong STL version?
recommend you rebuild full Ice by youself, because Ice Use stl, maybe your version of stl is not equal to Ice's stl verion.
on windows, VC 7.1 is better choice, because the stl is compatibile stl standards, but vc 6 's stl is garbage. |
|
||||||
|
Thank you.
After I download and compile the new release of STLPort, the number of link errors have reduced to 11. The linker always told me redefinition of some STL struct. The errors is followed: --------------------Configuration: php_ice - Win32 Debug-------------------- Linking... ice.obj : error LNK2005: "struct _STL::bidirectional_iterator_tag __cdecl _STL::iterator_category(struct _STL::_List_iterator_base const &)" (?iterator_category@_STL@@YA?AUbidirectional_itera tor_tag@1@ABU_List_iterator_base@1@@Z) already defined in communicator.obj ice.obj : error LNK2005: "int * __cdecl _STL::distance_type(struct _STL::_List_iterator_base const &)" (?distance_type@_STL@@YAPAHABU_List_iterator_base@ 1@@Z) already defined in communicator.obj marshal.obj : error LNK2005: "struct _STL::bidirectional_iterator_tag __cdecl _STL::iterator_category(struct _STL::_List_iterator_base const &)" (?iterator_category@_STL@@YA?AUbidirectional_itera tor_tag@1@ABU_List_iterator_base@1@@Z) already defined in communicator.obj marshal.obj : error LNK2005: "int * __cdecl _STL::distance_type(struct _STL::_List_iterator_base const &)" (?distance_type@_STL@@YAPAHABU_List_iterator_base@ 1@@Z) already defined in communicator.obj profile.obj : error LNK2005: "struct _STL::bidirectional_iterator_tag __cdecl _STL::iterator_category(struct _STL::_List_iterator_base const &)" (?iterator_category@_STL@@YA?AUbidirectional_itera tor_tag@1@ABU_List_iterator_base@1@@Z) already defined in communicator.obj profile.obj : error LNK2005: "int * __cdecl _STL::distance_type(struct _STL::_List_iterator_base const &)" (?distance_type@_STL@@YAPAHABU_List_iterator_base@ 1@@Z) already defined in communicator.obj proxy.obj : error LNK2005: "struct _STL::bidirectional_iterator_tag __cdecl _STL::iterator_category(struct _STL::_List_iterator_base const &)" (?iterator_category@_STL@@YA?AUbidirectional_itera tor_tag@1@ABU_List_iterator_base@1@@Z) already defined i n communicator.obj proxy.obj : error LNK2005: "int * __cdecl _STL::distance_type(struct _STL::_List_iterator_base const &)" (?distance_type@_STL@@YAPAHABU_List_iterator_base@ 1@@Z) already defined in communicator.obj util.obj : error LNK2005: "struct _STL::bidirectional_iterator_tag __cdecl _STL::iterator_category(struct _STL::_List_iterator_base const &)" (?iterator_category@_STL@@YA?AUbidirectional_itera tor_tag@1@ABU_List_iterator_base@1@@Z) already defined in communicator.obj util.obj : error LNK2005: "int * __cdecl _STL::distance_type(struct _STL::_List_iterator_base const &)" (?distance_type@_STL@@YAPAHABU_List_iterator_base@ 1@@Z) already defined in communicator.obj ice.obj : warning LNK4006: "struct _STL::bidirectional_iterator_tag __cdecl _STL::iterator_category(struct _STL::_List_iterator_base const &)" (?iterator_category@_STL@@YA?AUbidirectional_itera tor_tag@1@ABU_List_iterator_base@1@@Z) already defined i n communicator.obj; second definition ignored ice.obj : warning LNK4006: "int * __cdecl _STL::distance_type(struct _STL::_List_iterator_base const &)" (?distance_type@_STL@@YAPAHABU_List_iterator_base@ 1@@Z) already defined in communicator.obj; second definition ignored marshal.obj : warning LNK4006: "struct _STL::bidirectional_iterator_tag __cdecl _STL::iterator_category(struct _STL::_List_iterator_base const &)" (?iterator_category@_STL@@YA?AUbidirectional_itera tor_tag@1@ABU_List_iterator_base@1@@Z) already defin ed in communicator.obj; second definition ignored marshal.obj : warning LNK4006: "int * __cdecl _STL::distance_type(struct _STL::_List_iterator_base const &)" (?distance_type@_STL@@YAPAHABU_List_iterator_base@ 1@@Z) already defined in communicator.obj; second definition ignored profile.obj : warning LNK4006: "struct _STL::bidirectional_iterator_tag __cdecl _STL::iterator_category(struct _STL::_List_iterator_base const &)" (?iterator_category@_STL@@YA?AUbidirectional_itera tor_tag@1@ABU_List_iterator_base@1@@Z) already defin ed in communicator.obj; second definition ignored profile.obj : warning LNK4006: "int * __cdecl _STL::distance_type(struct _STL::_List_iterator_base const &)" (?distance_type@_STL@@YAPAHABU_List_iterator_base@ 1@@Z) already defined in communicator.obj; second definition ignored proxy.obj : warning LNK4006: "struct _STL::bidirectional_iterator_tag __cdecl _STL::iterator_category(struct _STL::_List_iterator_base const &)" (?iterator_category@_STL@@YA?AUbidirectional_itera tor_tag@1@ABU_List_iterator_base@1@@Z) already defined in communicator.obj; second definition ignored proxy.obj : warning LNK4006: "int * __cdecl _STL::distance_type(struct _STL::_List_iterator_base const &)" (?distance_type@_STL@@YAPAHABU_List_iterator_base@ 1@@Z) already defined in communicator.obj; second definition ignored util.obj : warning LNK4006: "struct _STL::bidirectional_iterator_tag __cdecl _STL::iterator_category(struct _STL::_List_iterator_base const &)" (?iterator_category@_STL@@YA?AUbidirectional_itera tor_tag@1@ABU_List_iterator_base@1@@Z) already defined in communicator.obj; second definition ignored util.obj : warning LNK4006: "int * __cdecl _STL::distance_type(struct _STL::_List_iterator_base const &)" (?distance_type@_STL@@YAPAHABU_List_iterator_base@ 1@@Z) already defined in communicator.obj; second definition ignored Creating library Debug/php_ice.lib and object Debug/php_ice.exp Debug/php_ice.dll : fatal error LNK1169: one or more multiply defined symbols found Error executing link.exe. php_ice.dll - 11 error(s), 10 warning(s) ------------------------------------------------------------------------------------------------------- I am confused that I succeeded in compiling ICE1.3 than failed to compile IcePHP 1.0.2. Faint! BTW, my compiler is MSVC6.0. Any replies are appreciated. Regards,
__________________
Fengxb |
|
||||||
|
Hi,
We're getting the same link errors, and we're looking into it. We honestly didn't expect that many users would be interested in compiling the Ice extension themselves, but would rather prefer to download the precompiled version. This version was compiled with VC7.0 and would require that you install the corresponding VC7.0 Ice binaries, so I realize that could cause some difficulties for you if you also want to use Ice with VC6. We'll let you know what we find out. Take care, - Mark |
|
||||||
|
To fix the link errors, edit the file IcePHP-1.0.2/src/ice/ice_common.h and add the line indicated below:
Code:
#include <Ice/Ice.h> #include <Slice/Parser.h> // ADD THIS LINE This fix will be included in the next release. Take care, - Mark |
|
||||||
|
Thank you, mes.
I edited the source code as your suggest. But there is a link error followed by. <br/> Generating Code... Linking... Creating library Debug/php_ice.lib and object Debug/php_ice.exp profile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall _STL::_Nondebug_string<char,class _STL::char_traits<char>,class _STL::allocator<char> >::find(char)const " (__imp_?find@?$_Nondebug_string @DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@Q BEID@Z) Debug/php_ice.dll : fatal error LNK1120: 1 unresolved externals Error executing link.exe. php_ice.dll - 2 error(s), 0 warning(s) <br/> Regards,
__________________
Fengxb |
|
||||||
|
I edit the Profile.cpp. I search all senteces include "find" and replace inverted comma with double quotation marks. It links successful. I hope it would work fine.
Thanks,
__________________
Fengxb |
![]() |
| 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 |
| vc 6 link error | mwilson | Help Center | 5 | 02-13-2007 08:15 PM |
| Purify Link error | joel vennin | Help Center | 5 | 08-07-2006 05:36 AM |
| dynamic link error | diddek | Bug Reports | 2 | 02-18-2004 04:16 PM |
| link error: error LNK2001: unresolved external symbol __imp___assert | gmueckl | Help Center | 2 | 09-03-2003 03:49 AM |
| link error with stl | simpley | Help Center | 11 | 09-02-2003 06:58 PM |