Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: johne53 on September 29, 2007, 03:16:28 pm

Title: Anyone knowledgeable about g++ (linker options) ?
Post by: johne53 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?
Title: Re: Anyone knowledgeable about g++ (linker options) ?
Post by: Biplab 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 .
Title: Re: Anyone knowledgeable about g++ (linker options) ?
Post by: johne53 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 (http://forums.codeblocks.org/index.php/topic,6944.0.html)

I'll be posting a full description there within the next few minutes....
Title: Re: Anyone knowledgeable about g++ (linker options) ?
Post by: Biplab on September 29, 2007, 04:54:10 pm
Nice to know that. That would help us pin-point the crash. :)