Boost logo

Boost Users :

Subject: Re: [Boost-users] [coroutine] errors compiling with clang 3.2
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2012-11-14 14:35:49


Am 13.11.2012 23:19, schrieb Marco Craveiro:
> <compilation error with MinGW/GCC 4.7>
>>> CMakeFiles/daemon.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x6da):
>>> undefined reference to `_make_fcontext'
>>> CMakeFiles/daemon.dir/objects.a(main.cpp.obj):main.cpp:(.text+0x7d0):
>>> undefined reference to `_jump_fcontext'
>>> ...
>>>
>> win64? on win7 32bit all unit-tests are OK.
> It is XP 32-bit actually. I'm linking against context
> (libboost_context-mgw47-mt-1_52.dll to be precise). What could cause
> these undefined references do you think? I must be missing something
> at the linker level, perhaps a windows library?
>

on Win7 I change in libs/context/example Jamfile.v2: <link>static in
<link>shared

bjam toolset=msvc-10.0 link=shared was successful
bjam toolset=gcc link=shared failed with the same error message :
undefined reference to `_imp_make_fcontext`

some lines above the output contains:
crreating library file:
...\gcc-mingw-4.6.2\debug\libboost_context-mgw46-d-1_50.dll.a
Warning: .drectve /EXPORT:_make_fcontext unrecognized

EXPORT is a directive on MASM which is used to compile the assembler
file - but the linker used by mingw does not know EXPORT - so it seams
to me a mingw issue

Oliver


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