Author Topic: Is Multithreading possible in CodeBlocks?  (Read 4550 times)

ScriptKiddy

  • Guest
Is Multithreading possible in CodeBlocks?
« on: October 23, 2009, 05:20:09 am »
Hi, I have been programming for about 2 years now, and my absolute favorite compiler to use is, and always will be Code::Blocks.

However, one problem I have had is not being able to run two threads at once.  I can run one thread using _beginthread, but I cannot run two at the same time.  I know it has to be possible to run two threads at the same time in codeblocks, (for example, one using SOCKETS, the other using directx)  Is this possible?  If it is, how would I run two threads at the same time in codeblocks?  (PS: I know how to do it in VC++ 06, but I had a linking problem, and don't want to use VC++ 08)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6074
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Is Multithreading possible in CodeBlocks?
« Reply #1 on: October 23, 2009, 06:45:39 am »
This topic is not related to C::B.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Is Multithreading possible in CodeBlocks?
« Reply #2 on: October 23, 2009, 07:08:31 am »
This topic is not related to C::B.

So the topic gets locked !!

Hi, I have been programming for about 2 years now, and my absolute favorite compiler to use is, and always will be Code::Blocks.

However, one problem I have had is not being able to run two threads at once.  I can run one thread using _beginthread, but I cannot run two at the same time.  I know it has to be possible to run two threads at the same time in codeblocks, (for example, one using SOCKETS, the other using directx)  Is this possible?  If it is, how would I run two threads at the same time in codeblocks?  (PS: I know how to do it in VC++ 06, but I had a linking problem, and don't want to use VC++ 08)

Be aware that C::B is not a compiler, "just" an IDE.
Read the documentation of the compiler you use and/or ask this question in a forum dedicated to this compiler.