Jump to content

Compiling from Code::Blocks


Yasha
 Share

Recommended Posts

I get errors when opening up a brand new project from the first time and trying to compile the empty project from within Code::Blocks:

 

/usr/bin/ld: /home/alex/Leadwerks/Library/Linux/Debug/Leadwerks.a(Thread.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line

 

Fixed this by adding -pthread (not -lpthread) to the front of the last compile step. Also then had to add -lX11 before it would link. (Done from the terminal, not sure how to add things from within CB.)

 

I assume having to do this is not normal?

 

I'm running Debian Jessie rather than Ubuntu but I also assume that the instructions issued by the IDE are project- rather than OS-dependent, so this strikes me as something worth bringing up.

 

 

Also found that running the program from within CB simply produced a black screen... the first two times, then it showed the boxes, as expected, and as happens immediately when running from within the editor. Again I assume this is not normal.

  • Upvote 1
Link to comment
Share on other sites

Hi

(Edit : Saw You have found the sollution as i commented below..... looks like it is needed for other distroes than Ubuntu (?) ).

 

 

Had the same problem using Mint. Go to "Project->Build Options" select build profile (Debug/Release) and then the tab for "Linker settings". Add pthread and X11 to the list of libraries to link to. This made my test game work.

 

BR

Eirik

  • Upvote 1
Link to comment
Share on other sites

  • 4 weeks later...
Guest zergling

Hello everyone,

Sorry my dumb question, but once I installed Code::Blocks, which project should I create?

 

Could someone please tell me step by step how to set Code::Clocks up to make it work with Lua?

 

Bye and thanks in advance.

Link to comment
Share on other sites

Could someone please tell me step by step how to set Code::Clocks up to make it work with Lua?

Short answer (onhanded typing still :( )

"Code::Blocks is a free C, C++ and Fortran IDE"

System:

Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...