Re: linking ghc object files with mingw-g++
| I'm trying to link ghc object files with mingw's | g++/ld... We have used the g++-2 compiler that you can get with Cygwin and it seems to work fine. (mingw-g++ and the normal g++ did not work for us.) Another hint: maybe you should give -lstdc++ as a flag to the final linking fase. A final hint: I have heard rumours of people changing the linker that GHC uses to be g++'s linker, maybe that helps in your case. Apparently, some C++ code requires special treatment at linking time, something that normal ld does not do. /Koen ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: linking ghc object files with mingw-g++
I have never tried to link C++ with GHC stuff; I know that it has caused people difficulties in the past. If someone who has got it working cares to write up some notes on what to do, I'll gladly incorporate them in the GHC users guide. From what Koen says, maybe it's possible! Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] | On Behalf Of Koen Claessen | Sent: 28 May 2003 07:17 | To: [EMAIL PROTECTED] | Cc: [EMAIL PROTECTED] | Subject: Re: linking ghc object files with mingw-g++ | | | | I'm trying to link ghc object files with mingw's | | g++/ld... | | We have used the g++-2 compiler that you can get with Cygwin | and it seems to work fine. (mingw-g++ and the normal g++ did | not work for us.) | | Another hint: maybe you should give -lstdc++ as a flag to | the final linking fase. | | A final hint: I have heard rumours of people changing the | linker that GHC uses to be g++'s linker, maybe that helps in | your case. Apparently, some C++ code requires special | treatment at linking time, something that normal ld does not | do. | | /Koen | | ___ | Glasgow-haskell-users mailing list | [EMAIL PROTECTED] | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: linking ghc object files with mingw-g++
Good morning! Thanks very much for your help... Compiling everything with cygwin c++-2 / gcc-2 works fine for me. | I'm trying to link ghc object files with mingw's | g++/ld... We have used the g++-2 compiler that you can get with Cygwin and it seems to work fine. (mingw-g++ and the normal g++ did not work for us.) Another hint: maybe you should give -lstdc++ as a flag to the final linking fase. A final hint: I have heard rumours of people changing the linker that GHC uses to be g++'s linker, maybe that helps in your case. Apparently, some C++ code requires special treatment at linking time, something that normal ld does not do. Johannes [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: linking ghc object files with mingw-g++
Hello again! This is gvc -v output: Hsc static flags: -static -fignore-interface-pragmas -fomit-interface-pragmas -f do-lambda-eta-expansion -flet-no-escape *** Linker c:\ghc\ghc-5.04.3\gcc -Bc:\ghc\ghc-5.04.3\gcc-lib/ -v -o a.out -DDONT_W ANT_WIN32_DLL_SUPPORT main.o Test.o Test_stub.o -Lc:/ghc/ghc-5.04.3 -L c:/ghc/ghc-5.04.3/gcc-lib -lHShaskell98 -lHSbase -lHSbase_cbits -lwsock3 2 -lmsvcrt -lkernel32 -luser32 -lHSrts -lm -lgmp -lwinmm -lwsock 32 -u _GHCziBase_Izh_static_info -u _GHCziBase_Czh_static_info -u _G HCziFloat_Fzh_static_info -u _GHCziFloat_Dzh_static_info -u _GHCziPtr_Pt r_static_info -u _GHCziWord_Wzh_static_info -u _GHCziInt_I8zh_static_inf o -u _GHCziInt_I16zh_static_info -u _GHCziInt_I32zh_static_info -u _ GHCziInt_I64zh_static_info -u _GHCziWord_W8zh_static_info -u _GHCziWord_ W16zh_static_info -u _GHCziWord_W32zh_static_info -u _GHCziWord_W64zh_st atic_info -u _GHCziStable_StablePtr_static_info -u _GHCziBase_Izh_con_in fo -u _GHCziBase_Czh_con_info -u _GHCziFloat_Fzh_con_info -u _GHCziF loat_Dzh_con_info -u _GHCziPtr_Ptr_con_info -u _GHCziPtr_FunPtr_con_info -u _GHCziStable_StablePtr_con_info -u _GHCziBase_False_closure -u _ GHCziBase_True_closure -u _GHCziPack_unpackCString_closure -u _GHCziIOBa se_stackOverflow_closure -u _GHCziIOBase_heapOverflow_closure -u _GHCziI OBase_NonTermination_closure -u _GHCziIOBase_BlockedOnDeadMVar_closure -u _GHCziIOBase_Deadlock_closure -u _GHCziWeak_runFinalizzerBatch_closure - u ___stginit_Prelude Reading specs from c:/ghc/ghc-5.04.3/gcc-lib/specs gcc version 2.95.3-6 (mingw special) $ c:/ghc/ghc-5.04.3/gcc-lib/ld.exe -Bdynamic -o a.out -u _GHCziBase_Izh_static_ info -u _GHCziBase_Czh_static_info -u _GHCziFloat_Fzh_static_info -u _GHCziFloa t_Dzh_static_info -u _GHCziPtr_Ptr_static_info -u _GHCziWord_Wzh_static_info -u _GHCziInt_I8zh_static_info -u _GHCziInt_I16zh_static_info -u _GHCziInt_I32zh_s tatic_info -u _GHCziInt_I64zh_static_info -u _GHCziWord_W8zh_static_info -u _GH CziWord_W16zh_static_info -u _GHCziWord_W32zh_static_info -u _GHCziWord_W64zh_s tatic_info -u _GHCziStable_StablePtr_static_info -u _GHCziBase_Izh_con_info -u _GHCziBase_Czh_con_info -u _GHCziFloat_Fzh_con_info -u _GHCziFloat_Dzh_con_info -u _GHCziPtr_Ptr_con_info -u _GHCziPtr_FunPtr_con_info -u _GHCziStable_StableP tr_con_info -u _GHCziBase_False_closure -u _GHCziBase_True_closure -u _GHCziPac k_unpackCString_closure -u _GHCziIOBase_stackOverflow_closure -u _GHCziIOBase_h eapOverflow_closure -u _GHCziIOBase_NonTermination_closure -u _GHCziIOBase_Bloc kedOnDeadMVar_closure -u _GHCziIOBase_Deadlock_closure -u _GHCziWeak_runFinaliz zerBatch_closure -u ___stginit_Prelude c:/ghc/ghc-5.04.3/gcc-lib/crt2.o -Lc:/gh c/ghc-5.04.3 -Lc:/ghc/ghc-5.04.3/gcc-lib -Lc:/ghc/ghc-5.04.3/gcc-lib -L/ming w/l ib/gcc-lib/mingw32/2.95.3-6/../../../../mingw32/lib -L/mingw/lib/gcc-lib/min gw3 2/2.95.3-6/../../.. main.o Test.o Test_stub.o -lHShaskell98 -lHSbase -lHSbase_c bits -lwsock32 -lmsvcrt -lkernel32 -luser32 -lHSrts -lm -lgmp -lwinmm -lwsoc k32 -lmingw32 -lgcc -lmoldname -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell3 2 - lmingw32 -lgcc -lmoldname -lmsvcrt main.o(.eh_frame+0x11):main.cpp: undefined reference to `__gxx_personality_v0' Any hint what this __gxx_personality_v0 means? Johannes [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users