Author Topic: Anyone knowledgeable about g++ (linker options) ?  (Read 4584 times)

Offline johne53

  • Regular
  • ***
  • Posts: 253
Anyone knowledgeable about g++ (linker options) ?
« on: September 29, 2007, 03:16:28 pm »
This isn't a question about how to program - it's a question about how to implement a particular linker option, using Code::Blocks.  :)

I'm trying to adapt a project (that's currently built using Scons) so that it can be built using C::B. At various points, the Scons build sends linker options to the (g++) compiler of the type -Wl,--export-dynamic

If I understand the documentation correctly, this causes the compiler to pass --export-dynamic to the linker. How would I implement this within a C::B project? Should I set up a compiler option of the form -Wl,--export-dynamic or should I set up a linker option of the form --export-dynamic ? Or doesn't it matter?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Anyone knowledgeable about g++ (linker options) ?
« Reply #1 on: September 29, 2007, 03:44:19 pm »
How would I implement this within a C::B project? Should I set up a compiler option of the form -Wl,--export-dynamic or should I set up a linker option of the form --export-dynamic ? Or doesn't it matter?

As this option is needed during linking, you should add this to Linker options as -Wl,--export-dynamic .
Be a part of the solution, not a part of the problem.

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Anyone knowledgeable about g++ (linker options) ?
« Reply #2 on: September 29, 2007, 04:40:20 pm »
Thanks Biplap. Incidentally, Just this minute I've tracked down one of the problems that's been causing those strange crashes that I reported on this thread:-

http://forums.codeblocks.org/index.php/topic,6944.0.html

I'll be posting a full description there within the next few minutes....

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Anyone knowledgeable about g++ (linker options) ?
« Reply #3 on: September 29, 2007, 04:54:10 pm »
Nice to know that. That would help us pin-point the crash. :)
Be a part of the solution, not a part of the problem.