Adding linker options to Code::Blocks

16,759

Never mind, i found the answer in this post http://forums.codeblocks.org/index.php/topic,15998.0.html

To sum up, in Code Blocks, go to

"Settings" -> "Compiler and debugger..."
"Global compiler settings"
"Linker settings"

Then add the following options to `"Other linker options":

-static-libgcc -static-libstdc++

Then you are off to go...

Share:
16,759

Related videos on Youtube

user1584421
Author by

user1584421

Updated on June 04, 2022

Comments

  • user1584421
    user1584421 almost 2 years

    When i try to run an executable compiled with Code::Blocks on my Win 7 x64 machine, it says it cannot run because the libgcc_s_dw2-1 is missing.

    I found a solution, to include the library in the linker options. (here is the reference i got it from: http://forums.codeblocks.org/index.php?topic=16748.0;prev_next=prev. look at the last post)

    The thing is, when i go to the linker settings, in Project Build Options, there are no libraries available there. Do i have to download the

    -static-libgcc
    -static-libstdc++
    

    as stated by the post, and put them in a directory so Code::Blocks can see them and add them to the linker options? If yes, where do i put the libraries?