|
Boost Users : |
From: Paul (elegant_dice_at_[hidden])
Date: 2008-07-01 02:21:47
Hi Mikko,
I saw this post, it was useful to get me started in the right direction, but
it did not work because it wanted to use pthreads instead of mthreads.
using the -d+2 flag to see what was happening ...
"/home/paul/mingw/bin/mingw32-g++" -ftemplate-depth-128 -O3
-finline-functions -Wno-inline -Wall -pthread -DBOOST_ALL_NO_LIB=1
-DNDEBUG -I"." -c -o
"bin.v2/libs/test/build/gcc-mingw-3.4.5/release/link-static/threading-multi/unit_test_log.o"
"libs/test/src/unit_test_log.cpp"
mingw32-g++: unrecognized option `-pthread'
did you compile it on windows-mingw or linux-mingw ?
cheers
Paul
2008/6/30 Mikko Vainio <mivainio_at_[hidden]>:
> Hi Paul,
>
> Please see a previous post on this list:
> http://lists.boost.org/boost-users/2008/04/35614.php
>
> Rgds,
> Mikko
>
> Paul wrote:
>
>> Hi,
>>
>> I find the bjam documentation and configuration files very frustrating...
>> it seems to almost do what you want, but it doesn't finish the job and tell
>> you how to actually do it correctly.
>>
>> I have been trying to cross-compile boost 1.35.0 for windows, on a linux
>> host. The gcc.jam file mentions cross-compiling, but does not mention how
>> to get it done.
>>
>> I almost got it to work with a user-config.jam:
>> using gcc
>> : mingw
>> : /home/paul/mingw/bin/mingw32-g++
>> : <flavor>mingw32
>> <root>"/home/paul/mingwj/"
>> ;
>>
>>
>> and then hacking away at the gcc.jam file, which checks the os.system
>> variable to decide how to link object files and use the -fPIC flag...
>>
>> around line 703:
>> if [ os.on-windows ] change to...
>> if [ modules.peek : UNIX ] to force it to use -mthreads instead of
>> -pthreads
>>
>> if [ os.name <http://os.name> ] != CYGWIN && [ os.name <http://os.name> ]
>> != NT change to
>> if [ os.name <http://os.name> ] = CYGWIN && [ os.name <http://os.name> ]
>> != NT to correct -fPIC
>>
>>
>> it almost did the right thing, except for the extensions... i assume if i
>> hack these lines, I'll get what i want...
>>
>> type.set-generated-target-suffix STATIC_LIB : <toolset>gcc
>> <target-os>cygwin : a ;
>> type.set-generated-target-suffix IMPORT_LIB : <toolset>gcc
>> <target-os>cygwin : dll.a ;
>> type.set-generated-target-prefix IMPORT_LIB : <toolset>gcc
>> <target-os>cygwin : lib ;
>>
>>
>> BUT then I'll have to fight to use the mingw32-ar and mingw32-windres and
>> other programs.
>>
>>
>> Isn't there an easier way? *please*
>>
>> I'm giving up on 1.35 as I've just read about the serialization vector
>> bug, so I'll attempt to use 1.34.1
>>
>> thanks,
>> Paul
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
> --
> :: Mikko Vainio <mikko.vainio_at_[hidden]> tel + 358 2 215 4600
> :: Structural Bioinformatics Laboratory
> :: Department of Biochemistry and Pharmacy
> :: Abo Akademi University, Tykistokatu 6A, FI-20520 Turku Finland
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net