Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8546109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:56:32+00:00 2026-06-11T12:56:32+00:00

I just wanna ask this very trivial question, I do not know if this

  • 0

I just wanna ask this very trivial question, I do not know if this the right question or if this one has been asked before and I know this can be solved by just visiting the documentation on boost. But I am really lost and stuck configuring boost.thread in C::B.

I am just a beginner when it comes to this and currently learning how to make windows app, well not seriously, just for learning purposes. I just notice that I really need the concept of multi-threading just to make it work. So I decided to use the Boost library, I did exactly what boost wiki says on building the libraries and I think I did not do something wrong.

I ran some couple of codes from the documentation that are header-only and it works flawlessly, but there are libraries included on boosts which requires special treatment of some sort including boost.thread which I am having difficulties. I know #includ-ing it on my file will not make Boost.thread works. I got errors from this basic code I found from an online tutorial (the very first code on multithreading page I found there) produces an error which says no such file directory.

||=== Multithreading_sample, Debug ===|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev          
C++\App\Multithreading_sample\Multithreading_sample\main.cpp|1|boost/thread.hpp: No such 
file or directory|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev    
C++\App\Multithreading_sample\Multithreading_sample\main.cpp||In function `void   
wait(int)':|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev  
C++\App\Multithreading_sample\Multithreading_sample\main.cpp|6|error: `boost' has not   
been declared|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev 
C++\App\Multithreading_sample\Multithreading_sample\main.cpp|6|error: `boost' has not 
been declared|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev    
C++\App\Multithreading_sample\Multithreading_sample\main.cpp|6|error: `seconds' cannot 
be used as a function|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev   
C++\App\Multithreading_sample\Multithreading_sample\main.cpp|6|error: `sleep' undeclared 
(first use this function)|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev 
C++\App\Multithreading_sample\Multithreading_sample\main.cpp|6|error: (Each undeclared 
identifier is reported only once for each function it appears in.)|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev   
C++\App\Multithreading_sample\Multithreading_sample\main.cpp||In function `int main()':|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev  
C++\App\Multithreading_sample\Multithreading_sample\main.cpp|20|error: `boost' has not 
been declared|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev   
C++\App\Multithreading_sample\Multithreading_sample\main.cpp|20|error: expected `;' 
before "t"|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev   
C++\App\Multithreading_sample\Multithreading_sample\main.cpp|20|warning: statement is a   
reference, not call, to function `thread'|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev   
C++\App\Multithreading_sample\Multithreading_sample\main.cpp|20|warning: statement has 
no effect|
C:\Documents and Settings\Owner\Desktop\Programming\C++\Dev   
C++\App\Multithreading_sample\Multithreading_sample\main.cpp|21|error: `t' undeclared 
(first use this function)|
||=== Build finished: 9 errors, 2 warnings ===|

and for which I know it doesn’t detect my boost.thread library, I don’t know where to go in this part. I’ve searched google but I think my best bet is to build the 1boost.thread1 separately as shown here, and I do not know what to do next.

  • My boost library version is 1.51.0 my C::B is 10.05 running on windows XP, and I want to use boost.thread in my CodeBlocks. All I wanted to do is to just paste the code and run it and see how it works.
  • My MinGW version is 3.4.2
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:56:33+00:00Added an answer on June 11, 2026 at 12:56 pm

    Finally, after days of research and googling and cross referencing multitude of solution over the web I finally made the first code on the site I provided.

    first what I did is that I included the extract_directory as the base under builtin fields in global variables. Then I went to project options and I clicked on the name of the project in hierarchy and search directories I added the $(#boost.include) on compiler tab and $(boost)\stage\lib on linker tab.

    I started again from scratch in rebuilding boost(esp building boost.thread library) and I follow again what is exactly written on the documentation and then I finally got some error saying undefined reference error on Boost::system. What I did to solve this problem is to link my project against that boost.system (which is in my case was the file in my stage\lib folder).

    I link this library on my project
    libboost_system-mgw34-mt-1_51.a

    When I compile my program, an error occurred saying undefined reference to boost::chrono, which library name is:

    libboost_chrono-mgw34-mt-1_51.a

    and I also link my project against it, the same way I did for boost::system.

    And it compiles! With no warnings whatsoever, what I learned from this experience is that I have to look for the libraries needed, what I am doing so far is to just link the boost.thread library and error just keep on saying undefined reference error to boost.system which I am not aware has something to do with boost threads or with other libraries(this is the first error I encountered before I messed things up). I think there are multiple function calls inside each boost libraries that are on another libraries so I have to link with them also that requires such call.

    Thank you guys for your kind responses.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just wanna ask this question. Can I use detailTextLabel in a Custom Cell? I
i'm sorry if there is a question like this i just wanna know, i'm
I probably missed something but just wanna ask.. I found this code in the
Greetings everyone, i just wanna ask.. how do i disable the right click property
Just wanna ask about this php Basic access authentication, is there anyway to reduce
Just wanna know, how do I must use this ? Do I just have
I just wanna ask if there's a way where I could put an object
I just wanna ask your opinion/suggestion on how to 'terminate' a running application/process is
I just wanna ask if there's a way in C#/ASP.NET to create 'dynamic' tables/fields
I just wanna ask if there's a possibility to retrieve the contents of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.