Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 04-29-2003
Diego Giraldez Diego Giraldez is offline
Registered User
 
 
Join Date: Apr 2003
Posts: 10
Unhappy Compilation error

I'm using RedHat 7.2 and gcc 3.2; I'm compiling version 1.0.1
Both shared libraries libIceUtil.so and libSlice compiles and links well, but later slice2cpp doesn't. Any ideas? Here are the make output:

make[2]: Entering directory `/home/ax10077/Ice-1.0.1/src/IceUtil'
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall Exception.cpp
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall Unicode.cpp
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall UUID.cpp
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall RecMutex.cpp
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall RWRecMutex.cpp
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall Cond.cpp
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall Thread.cpp
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall ThreadException.cpp
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall Time.cpp
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall InputUtil.cpp
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall OutputUtil.cpp
c++ -c -I../../include -g -ftemplate-depth-128 -fPIC -Wall Base64.cpp
rm -f ../../lib/libIceUtil.so.1.0.1
c++ -shared -Xlinker -soname -Xlinker libIceUtil.so.1.0.1 -L../../lib -o ../../lib/libIceUtil.so.1.0.1 Exception.o Unicode.o UUID.o RecMutex.o RWRecMutex.o Cond.o Thread.o ThreadException.o Time.o InputUtil.o OutputUtil.o Base64.o
rm -f ../../lib/libIceUtil.so
ln -s libIceUtil.so.1.0.1 ../../lib/libIceUtil.so
make[2]: Leaving directory `/home/ax10077/Ice-1.0.1/src/IceUtil'

make[2]: Entering directory `/home/ax10077/Ice-1.0.1/src/Slice'
c++ -c -I.. -I../../include -g -ftemplate-depth-128 -fPIC -Wall Scanner.cpp
c++ -c -I.. -I../../include -g -ftemplate-depth-128 -fPIC -Wall Grammar.cpp
c++ -c -I.. -I../../include -g -ftemplate-depth-128 -fPIC -Wall Parser.cpp
c++ -c -I.. -I../../include -g -ftemplate-depth-128 -fPIC -Wall CPlusPlusUtil.cpp
c++ -c -I.. -I../../include -g -ftemplate-depth-128 -fPIC -Wall JavaUtil.cpp
c++ -c -I.. -I../../include -g -ftemplate-depth-128 -fPIC -Wall Preprocessor.cpp
rm -f ../../lib/libSlice.so.1.0.1
c++ -shared -Xlinker -soname -Xlinker libSlice.so.1.0.1 -L../../lib -o ../../lib/libSlice.so.1.0.1 Scanner.o Grammar.o Parser.o CPlusPlusUtil.o JavaUtil.o Preprocessor.o
rm -f ../../lib/libSlice.so
ln -s libSlice.so.1.0.1 ../../lib/libSlice.so
make[2]: Leaving directory `/home/ax10077/Ice-1.0.1/src/Slice'

make[2]: Entering directory `/home/ax10077/Ice-1.0.1/src/slice2cpp'
c++ -c -I. -I../../include -g -ftemplate-depth-128 -fPIC -Wall Gen.cpp
c++ -c -I. -I../../include -g -ftemplate-depth-128 -fPIC -Wall Main.cpp
rm -f ../../bin/slice2cpp
c++ -L../../lib -o ../../bin/slice2cpp Gen.o Main.o -lSlice -lIceUtil -lpthread -luuid
../../lib/libIceUtil.so: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >:perator[](unsigned) const'
../../lib/libIceUtil.so: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string [in-charge]()'
../../lib/libIceUtil.so: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::length() const'
../../lib/libIceUtil.so: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >:perator+=(wchar_t)'
../../lib/libIceUtil.so: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::reserve(unsigned)'
../../lib/libIceUtil.so: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string[in-charge]()'
collect2: ld returned 1 exit status

thanks in advance. Diego.
Reply With Quote
  #2 (permalink)  
Old 04-29-2003
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,475
Hi Diego,

It looks a lot like the error you would get if you use the STL library from gcc 2.96.x (which doesn't have support for std::wstring). Can you make sure you're using the right compiler?

You should be able to check for the STL C++ library with:

c++ -print-file-name=libstdc++.so

This should print the path of the STL library which will be used to link your program with.

Benoit.
Reply With Quote
  #3 (permalink)  
Old 04-29-2003
Diego Giraldez Diego Giraldez is offline
Registered User
 
 
Join Date: Apr 2003
Posts: 10
Arrow

Thanks Benoi

Here is the requested command:

c++ -print-file-name=libstdc++.so
/usr/lib/gcc-lib/i386-redhat-linux/3.2/libstdc++.so

It's gcc 3.2 version. Any other idea?

Best regards. Diego.
Reply With Quote
  #4 (permalink)  
Old 04-29-2003
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: 962
If I were having this problem, I'd probably try poking around in the library to see if these symbols are present. For example:

nm -C /usr/lib/gcc-lib/i386-redhat-linux/3.2/libstdc++.so | grep 'basic_string.*wchar' | more

Another option would be to build GCC yourself.

Finally, you can disable the compilation of src/IceUtil/Unicode.cpp. This file contains utility functions that are not used by the rest of the Ice distribution.

- Mark
Reply With Quote
  #5 (permalink)  
Old 04-29-2003
Diego Giraldez Diego Giraldez is offline
Registered User
 
 
Join Date: Apr 2003
Posts: 10
Smile Solved

The problem was that my gcc version doesn't support Unicode. I removed Unicode from libIceUtil, and now it links ok.
Thanks a lot. Diego.
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
ICE 3.0.0. VC7.1 compilation error AnandRathi Bug Reports 3 11-28-2005 12:32 AM
Strange compilation error with VC6 / Ice 1.4.0 annekat Help Center 3 07-05-2004 01:15 PM
AdapterRegistryI.cpp compilation error marlowa Bug Reports 3 03-13-2003 08:21 AM
weird template compilation error on solaris marlowa Bug Reports 5 02-25-2003 07:18 AM
Ice-1.0.1/C++/compilation Ivan Bug Reports 2 02-25-2003 03:12 AM


All times are GMT -4. The time now is 10:54 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.