Boost logo

Boost Users :

Subject: [Boost-users] bjam cross compilation using mingw32 doesn't use mingw32-ar ?
From: Ákos Maróy (akos_at_[hidden])
Date: 2009-02-22 11:17:32


I'm trying to cross-compile boost using mingw32, doing the following steps:

echo "using gcc : : mingw32-g++ ;" >> user-config.jam

bjam target-os=windows threading=multi threadapi=win32 link=static
runtime-link=static --prefix=../../usr-mingw
--includedir=../../usr-mingw/include --libdir=../../usr-mingw/lib install

this goes down fine. but when I'm trying to link to one of the boost
libraries, I get the following:

mingw32-g++ -m32 -g -L../../usr-mingw/lib -o tests test_plane_position.o
test_position_recorder.o test_position_player.o plane_position.o
position_recorder.o position_player.o tests.o
-llibboost_test_exec_monitor-mgw41-mt-s-1_38
-llibboost_unit_test_framework-mgw41-mt-s-1_38
../../usr-mingw/lib/libboost_test_exec_monitor-mgw41-mt-s-1_38.lib:
could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
make: *** [tests] Error 1

where:

$ file ../../usr-mingw/lib/libboost_unit_test_framework-mgw41-mt-s-1_38.lib
../../usr-mingw/lib/libboost_unit_test_framework-mgw41-mt-s-1_38.lib:
current ar archive

I did some search, and one suggestion was that the build process didn't
use mingw32-ar for creating the libraries? if so, how could I make bjam
use mingw32-ar instead of just ar?

or is something else the issue?

Akos

(of course I could just run ranlib on these libs, but my expectation was
that the boost build / install process would produce libraries that one
could link to right away)


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