Linking against libbfd under Windows/CygWin/MingW

Dave Korn dave.korn@artimi.com
Tue Jan 9 16:24:00 GMT 2007


On 09 January 2007 16:19, David D. Hagood wrote:

> What steps are needed to be able to create a Windows command line
> executable which links against libbfd?

  Build and install libbfd, then just compile your app with "-lbfd".

> Ideally, I'd like to simply cross-compile it on my Linux box and hand
> him the executable, but I'm not sure on how to insure the proper linkage
> against libbfd, as well as the other dain-bramage needed to run a
> Windows CLI program.

  Perhaps you're best off compiling libbfd with --disable-shared and just
statically linking it into the final app?

> I've not found any good docs on this - most folks building Ming programs
> that I've found are NOT linking against other *nix-y things like libbfd.

  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.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....



More information about the Binutils mailing list