gcjh, Headers hierarchy and namespaces

Florian Bourgier fbourgier@sycomore-multimedia.com
Tue Jul 20 12:11:00 GMT 2004


Thanks a lot. It allows me to go further but I still got errors like these :
natIconv.cc: undefined reference to `_libiconv'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../libgcj.a(natInflater.o)(.text+0x88
):natInflater.cc: undefined reference to `_inflateEnd'
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../libgcj.a(natInflater.o)(.text+0x4f
1):natInflater.cc: undefined reference to `_inflate'
Another library to link ?
Regards,
Florian BOURGIER
Michael Koch wrote:
>Am Dienstag, 20. Juli 2004 13:40 schrieb Florian Bourgier:
>>>>Ok thanks now it finds the headers but compling is ok but not
>>linking with the following code (which is not using my headers and
>>my library) i got an error :
>>>>#include <iostream>
>>#include <java/lang/String.h>
>>#include <gcj/array.h>
>>#include <gcj/cni.h>
>>#include <gnu/gcj/RawData.h>
>>#include <java/lang/System.h>
>>using namespace std;
>>>>int main()
>>{
>> std::string cppstr("Hello, C++ String");
>> jstring jstr = JvNewStringUTF(cppstr.c_str());
>> //::java::lang::System::out->println(jstr);
>> cout << jstr;
>>}
>>>>Here what I get with > g++ Exemple.c -o Exemple.exe
>>>>/cygdrive/c/DOCUME~1/FBOURG~1/LOCALS~1/Temp/ccey63Ls.o(.text+0x34):
>>Exemple.c: und
>>efined reference to `___gcj_personality_sj0'
>>/cygdrive/c/DOCUME~1/FBOURG~1/LOCALS~1/Temp/ccey63Ls.o(.text$_Z14Jv
>>NewStringUTFPK c+0xd):Exemple.c: undefined reference to
>>`__Jv_NewStringUTF' collect2: ld returned 1 exit status
>>>>I tried to specify -Llibgch or -Llibjava but none of them is
>>changing anything.
>>>>What can i do ? Thanks
>>>>>>If you link with g++ you need to add "-lgcj"
>>>Michael
>>>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /