Author Topic: Configuring Boost with Code::Blocks  (Read 56629 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: Configuring Boost with Code::Blocks
« Reply #15 on: April 04, 2012, 09:01:27 pm »
link with the needed boost libraries, in your case minimum boost thread

Offline Master

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: Configuring Boost with Code::Blocks
« Reply #16 on: April 04, 2012, 10:04:44 pm »
link with the needed boost libraries, in your case minimum boost thread
thank you , are'nt all of the libs created already ? because im sure i set up the linker to look for the libraries in the correct folder .
would you please tell me how i can build just everything ?
i assume this library is not built ? right?
a man's dream is an index to his greatness...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12121
    • Travis build status
Re: Configuring Boost with Code::Blocks
« Reply #17 on: April 04, 2012, 10:12:46 pm »
Master: Keep in mind that boost has they support, here we support C::B and your question is quite off topic!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Configuring Boost with Code::Blocks
« Reply #18 on: April 04, 2012, 10:14:44 pm »
what is it that i am missing ?
You miss to inspect / provide the full build log (see my sig).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Master

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: Configuring Boost with Code::Blocks
« Reply #19 on: April 04, 2012, 10:48:11 pm »
Master: Keep in mind that boost has they support, here we support C::B and your question is quite off topic!
yes you are right , but since it was concerned with CB in terms of configuration and again because of using a svn version , i thought there might be sth wrong with the CB svn or sth has changed that i am unware of .so basically the best place to find about this would be here to my opinion .
and googling got me here by the way , thought i could use some help with the people working daily with CB .

Quote
You miss to inspect / provide the full build log (see my sig).
here is the full build log .
Code: [Select]
http://upload.ustmb.ir/uploads/13335802852.zip
Thank you in advance
a man's dream is an index to his greatness...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: Configuring Boost with Code::Blocks
« Reply #20 on: April 04, 2012, 10:52:07 pm »
link with the needed boost libraries, in your case minimum boost thread
thank you , are'nt all of the libs created already ? because im sure i set up the linker to look for the libraries in the correct folder .
would you please tell me how i can build just everything ?
i assume this library is not built ? right?
telling where the libraries are is not enough, you need to tell the linker to which ones one to link.

Offline Master

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: Configuring Boost with Code::Blocks
« Reply #21 on: April 04, 2012, 11:06:19 pm »
link with the needed boost libraries, in your case minimum boost thread
thank you , are'nt all of the libs created already ? because im sure i set up the linker to look for the libraries in the correct folder .
would you please tell me how i can build just everything ?
i assume this library is not built ? right?
telling where the libraries are is not enough, you need to tell the linker to which ones one to link.
how am i supposed to that ? have i not already done that ? (in linker section (in both debug and release ) i selected all of built libs and .a files !
a man's dream is an index to his greatness...

Offline Master

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: Configuring Boost with Code::Blocks
« Reply #22 on: April 05, 2012, 05:26:43 am »
ok i believe i compiled all necessary libs ( they are now more than 4Gigabyte !)
here are the screen shots of my settings . its all i have done to the CB at the moment . :





what is wrong with it ? :-\
a man's dream is an index to his greatness...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Configuring Boost with Code::Blocks
« Reply #23 on: April 05, 2012, 06:30:57 am »
what is wrong with it ? :-\
You still did not post the full build log. So I cannot tell.

From the screenshots I see that you link against all boost libs, this will not work, too. Boost compiles in many flavours. You need to pick one flavour of your choice and then only link against those lib(s) you are actually using, not just all.

Probably you should start reading the boost manual - it seems you don't really know what you are doing. We don't provide boost support here, this is a Code::Blocks forum. Boost has its own forum. You need to know what lib you need to use in what flavour. Tat's a decision I nobody make for you, as it depends on what you have in mind with your project.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Master

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: Configuring Boost with Code::Blocks
« Reply #24 on: April 05, 2012, 06:35:59 am »
what is wrong with it ? :-\
You still did not post the full build log. So I cannot tell.

From the screenshots I see that you link against all boost libs, this will not work, too. Boost compiles in many flavours. You need to pick one flavour of your choice and then only link against those lib(s) you are actually using, not just all.

Probably you should start reading the boost manual - it seems you don't really know what you are doing. We don't provide boost support here, this is a Code::Blocks forum. Boost has its own forum. You need to know what lib you need to use in what flavour. Tat's a decision I nobody make for you, as it depends on what you have in mind with your project.
thank you . and sorry for that ,
i have already posted the full build log : here it is again :
http://upload.ustmb.ir/uploads/13335802852.zip
and ok . i'll try to fix that too
a man's dream is an index to his greatness...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12121
    • Travis build status
Re: Configuring Boost with Code::Blocks
« Reply #25 on: April 05, 2012, 08:21:14 am »
Also don't use full paths to the libraries, just their names. In the Build options -> Linker setting -> Link libraries
If I remember correctly using full paths is known to fail.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Master

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: Configuring Boost with Code::Blocks
« Reply #26 on: April 05, 2012, 11:03:14 pm »
Also don't use full paths to the libraries, just their names. In the Build options -> Linker setting -> Link libraries
If I remember correctly using full paths is known to fail.
thank you dear oBFusCATed , i tested your suggestion , but it turned up that it was wrong . actually there is nothing wrong with the full path .
here is the answer though :
http://stackoverflow.com/questions/10022706/having-issue-in-configuring-boost-with-codeblocks/10035917#10035917
i rebuilt the boost with
Code: [Select]
bjam toolset=gcc --build-type=complete stage variant=debug,release threading=multi link=static and then added the following line to my source code
Code: [Select]
#define BOOST_THREAD_USE_LIBand there it goes :) compiling , linking just fine :)
and i didnt change any of my previouse configurations , just rebuilt and added that line , done :)
thanks again everyone
a man's dream is an index to his greatness...

Offline GigaGerard

  • Single posting newcomer
  • *
  • Posts: 4
Re: Configuring Boost with Code::Blocks
« Reply #27 on: December 22, 2015, 10:26:36 pm »
How to get Boost working in CodeBlocks with GCC
and get the test file of Alpha in post 2 running?
I did it!
Advice that helped me most was:

Change the word msvc to gcc in the boost file project-config.jam and run b2 to compile boost (again).

Not only set the two paths in CodeBlocks > Settings > Global Variables > Build-in fields:
 > base > C:\MY_DIR\boost_1_56_0\
 > lib > C:\MY_DIR\boost_1_56_0\stage\lib

But also set them in CodeBlocks > Settings > Compiler > Search directories
> Compiler > Add >
> Linker > Add >
« Last Edit: December 22, 2015, 10:30:51 pm by GigaGerard »