I personally hacked just gcc 3.2. Not sure it will work with gcc 3.3.x family. 0. Copy gcc-3.2.tar.gz distribution to any directory. Let's name this directory as "<dist>. 1. Become user "root" and choose a directory where you are going to unpack gcc distribution. Let's call it <gcc-prefix>. Then: cd <gcc-prefix> 2. Unpack distribution gcc-3.2.tar.gz using command "gtar -zxf <dist>/gcc-3.2.tar.gz" (automatically creates top directory gcc-3.2 in <gcc-prefix>) 3. Follow the steps bellow (to fix wchar support problem): 3.1. In directory <gcc-prefix>/gcc-3.2/libstdc++-v3: remove all occurrences of the words: "vfwscanf", "vswscanf", "vwscanf", "wcstof" from the following files: acinclude.m4 (1 spot) aclocal.m4 (1 spot) configure (6 spots) 3.2 In the directory <gcc-prefix>/gcc-3.2/libstdc++-v3/include/c_std/: file std_cwctype.h: remove string "using ::iswblank;" file std_cwchar.h: remove the following strings: "using ::vfwscanf;" "using ::vswscanf;" "using ::vwscanf;" "using ::wcstof;" 4. Continue the standard way 4.1 Choose a directory where you are going to create build directory. Let's call it <build-prefix>. Go there: cd <build-prefix> 4.2. create build directory (e.g. gcc-3.2-build), create installation directory (e.g. /opt/gcc) 4.3 cd gcc-3.2-build 2.4 <gcc-prefix>/gcc-3.2/configure --prefix=/opt/gcc --enable-threads=posix --enable-languages=c,c++ 2.5 make bootstrap. It takes a while. 2.6 make install Hope it'll help. ---- Lev Assinovsky Aelita Software Corporation O&S InTrust Framework Division, Team Leader ICQ# 165072909 > -----Original Message----- > From: Kyrre Kristiansen [mailto:kyrre_kristiansen@xxxxxxxxxxx] > Sent: Wednesday, December 03, 2003 3:51 PM > To: gcc-help@xxxxxxxxxxx > Subject: Solaris and std::wstring - Help! > > > Hello. > > I've been trying to compile some C++ code for Solaris > for a while now, and are having quite a lot of > problems with code that uses wstring. > > 1. Firstly, I've tried to just compile it, and I get > Source/WStringAttributeType.h:50: error: no type > `wstring' in `std' from the compiler. > 2. I tried to create my own .h- file, that contained > the following: > > #include <string> > > namespace std > { > typedef std::basic_string<wchar_t, > std::char_traits<wchar_t>, std::allocator<wchar_t> > > std::wstring; > } > > This compiled fine, also with my code. But, upon > linking, it comes up with unresolved symbols: > > libc.so.1 => /usr/lib/libc.so.1 > libstdc++.so.5 => > /usr/local/lib/libstdc++.so.5 > libgcc_s.so.1 => > /usr/local/lib/libgcc_s.so.1 > libdl.so.1 => /usr/lib/libdl.so.1 > libm.so.1 => /usr/lib/libm.so.1 > > /usr/platform/SUNW,Sun-Fire-V210/lib/libc_psr.so.1 > symbol not found: > _ZNSt11char_traitsIwE6lengthEPKw > (./libNVDBModell.so) > symbol not found: > _ZNSt11char_traitsIwE7compareEPKwS2_j > (./libNVDBModell.so) > symbol not found: > _ZNSt11char_traitsIwE4copyEPwPKwj > (./libNVDBModell.so) > symbol not found: > _ZNSt11char_traitsIwE4moveEPwPKwj > (./libNVDBModell.so) > > Anyone konw how I can get my code successfully > compiled and linked with gcc? > from gcc -v: > Reading specs from > /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/specs > Configured with: ../configure > --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld > --disable-nls > Thread model: posix > gcc version 3.3.2 > > > It is very important that I can compile with wstring, > as a lot of important code is using it! > > With regards, > Kyrre. > > ===== > ------------------------------------------------------------ > Kyrre Kristiansen > > ______________________________________________________________ > __________ > Download Yahoo! Messenger now for a chance to win Live At > Knebworth DVDs > http://www.yahoo.co.uk/robbiewilliams >
Attachment:
gcc_hack_wide.sh
Description: gcc_hack_wide.sh