Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-06-2004
fengxb's Avatar
fengxb fengxb is offline
Registered User
 
Name: feng xuebin
Organization: jiexin tech
Project: scientific calculation
 
Join Date: Aug 2003
Location: R.P.China
Posts: 78
Ice Php 1.0.2 link error

Hi,

I downloaded the new release of ICE and IcePhp. After succeeded in compiling the ICE, I Failed to compile the IcePhp. The compiler is MSVC6.0.

The link errors lare isted:

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
marshal.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall Slice::ClassDef::isA(class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const &)const " (__imp_?isA@ClassDe
f@Slice@@QBE_NABV?$basic_string@DV?$char_traits@D@ _STL@@V?$allocator@D@2@@_STL@@@Z)
marshal.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Ice::Object::ice_postUnmarshal(void)" (?ice_postUnmarshal@Object@Ice@@UAEXXZ)
marshal.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Ice::Object::ice_preMarshal(void)" (?ice_preMarshal@Object@Ice@@UAEXXZ)
Debug/php_ice.dll : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

php_ice.dll - 14 error(s), 10 warning(s)
__________________
Fengxb
Reply With Quote
  #2 (permalink)  
Old 03-07-2004
damingyipai damingyipai is offline
Registered User
 
 
Join Date: Jan 2004
Posts: 59
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.
Reply With Quote
  #3 (permalink)  
Old 03-07-2004
damingyipai damingyipai is offline
Registered User
 
 
Join Date: Jan 2004
Posts: 59
multiple stl implement?

seem like your stl is stlport? the stlport include directory must be first in path list.
Reply With Quote
  #4 (permalink)  
Old 03-07-2004
fengxb's Avatar
fengxb fengxb is offline
Registered User
 
Name: feng xuebin
Organization: jiexin tech
Project: scientific calculation
 
Join Date: Aug 2003
Location: R.P.China
Posts: 78
Thanks for your reply.

I have compiled ICE 1.3 with correct STLPort 4.5.3.
__________________
Fengxb
Reply With Quote
  #5 (permalink)  
Old 03-08-2004
damingyipai damingyipai is offline
Registered User
 
 
Join Date: Jan 2004
Posts: 59
maybe need to rebuild all, if not do this.

.
Reply With Quote
  #6 (permalink)  
Old 03-08-2004
fengxb's Avatar
fengxb fengxb is offline
Registered User
 
Name: feng xuebin
Organization: jiexin tech
Project: scientific calculation
 
Join Date: Aug 2003
Location: R.P.China
Posts: 78
Which version STL Port did you use to compile?
__________________
Fengxb
Reply With Quote
  #7 (permalink)  
Old 03-08-2004
damingyipai damingyipai is offline
Registered User
 
 
Join Date: Jan 2004
Posts: 59
on windows, I use Visual C++.NET 2003

it still works well.
Reply With Quote
  #8 (permalink)  
Old 03-08-2004
damingyipai damingyipai is offline
Registered User
 
 
Join Date: Jan 2004
Posts: 59
if you use VC++ 2003 to build Ice,

you need not stlport. because stl in VC++ 2003 is followed standard .
Reply With Quote
  #9 (permalink)  
Old 03-08-2004
fengxb's Avatar
fengxb fengxb is offline
Registered User
 
Name: feng xuebin
Organization: jiexin tech
Project: scientific calculation
 
Join Date: Aug 2003
Location: R.P.China
Posts: 78
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
Reply With Quote
  #10 (permalink)  
Old 03-08-2004
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
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
Reply With Quote
  #11 (permalink)  
Old 03-08-2004
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
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
I'm still not sure why this is necessary, but I suspect a compiler bug since it compiles fine in VC 7.0 without this change.

This fix will be included in the next release.

Take care,
- Mark
Reply With Quote
  #12 (permalink)  
Old 03-09-2004
fengxb's Avatar
fengxb fengxb is offline
Registered User
 
Name: feng xuebin
Organization: jiexin tech
Project: scientific calculation
 
Join Date: Aug 2003
Location: R.P.China
Posts: 78
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
Reply With Quote
  #13 (permalink)  
Old 03-09-2004
fengxb's Avatar
fengxb fengxb is offline
Registered User
 
Name: feng xuebin
Organization: jiexin tech
Project: scientific calculation
 
Join Date: Aug 2003
Location: R.P.China
Posts: 78
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
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -4. The time now is 11:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.