Linking against libbfd under Windows/CygWin/MingW

David D. Hagood wowbagger@sktc.net
Tue Jan 9 22:38:00 GMT 2007
Dave Korn wrote:

>   Perhaps you're best off compiling libbfd with --disable-shared and just
> statically linking it into the final app?
> 
That would be fine - IF I could get the damn compiler to build. All the 
versions I've found have had just C, not C++ (which I need internal to 
my program) and I cannot get any version of GCC to build successfully.


>   We do it all the time on cygwin, and we even use dlopen/dlsym to load dll's
> as if they were standard dsos.  There should not be any serious difficulties.
>

What magic do I need to avoid getting the "ctype_base.h:56: error: '_N' 
was not declared in this scope" errors - I've specified 
--target=i386-mingw32 --host=i686-pc-gnu-linux, but when libstdc++ is 
configured, it is configured with --host=i386-mingw32 and so picks up a 
header that is wrong wrong wrong and won't build.



More information about the Binutils mailing list