Author Topic: How to configure Code::Blocks to use MinGW Tool set?  (Read 5700 times)

Offline jayanthd

  • Single posting newcomer
  • *
  • Posts: 4
How to configure Code::Blocks to use MinGW Tool set?
« on: September 12, 2013, 09:27:42 pm »
How to configure Code::Blocks to use MinGW Tool set?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12692
    • Travis build status
(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 stahta01

  • Lives here!
  • ****
  • Posts: 6945
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline jayanthd

  • Single posting newcomer
  • *
  • Posts: 4
Re: How to configure Code::Blocks to use MinGW Tool set?
« Reply #3 on: September 13, 2013, 08:19:00 am »
Now whenever I start code::blocks I get error mspdb100.dll is missing from your Computer. I click ok and project opens. When I Compile I get the error shown in image.

[attachment deleted by admin]

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: How to configure Code::Blocks to use MinGW Tool set?
« Reply #4 on: September 13, 2013, 08:24:15 am »
It looks like you screwed up your settings and the project or target does not use GCC-compiler, but at least the linker from Microsoft.

Offline jayanthd

  • Single posting newcomer
  • *
  • Posts: 4
Re: How to configure Code::Blocks to use MinGW Tool set?
« Reply #5 on: September 13, 2013, 10:04:50 am »
I didn't screw up anything. I just reinstalled code::blocks and then set the compiler paths as shown and then restarted the IDE and it started giving dll error.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5234
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How to configure Code::Blocks to use MinGW Tool set?
« Reply #6 on: September 13, 2013, 10:16:24 am »
I didn't screw up anything. I just reinstalled code::blocks and then set the compiler paths as shown and then restarted the IDE and it started giving dll error.
I look at your screen shot. If I remember correctly, the log message "LNK1104..." is generated from MSVC C++ compiler, not MinGW GCC compiler. So I believe you use the wrong compiler suite.
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 jayanthd

  • Single posting newcomer
  • *
  • Posts: 4
Re: How to configure Code::Blocks to use MinGW Tool set?
« Reply #7 on: September 13, 2013, 10:41:02 am »
I have posted the Compiler paths. It is clearly MinGW Compiler tool set. I have selected GCC Compiler.


Edit: It worked. I closed and opened code::blocks and it worked and Compiled without problem. I don't know what was the problem. I didn't change anything. See screenshot. I have another question. Where should I ask C++ code related question?

Thanks everybody who answered in this thread.
« Last Edit: September 13, 2013, 10:48:13 am by jayanthd »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5234
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How to configure Code::Blocks to use MinGW Tool set?
« Reply #8 on: September 13, 2013, 10:59:04 am »
I have posted the Compiler paths. It is clearly MinGW Compiler tool set. I have selected GCC Compiler.



Edit: It worked. I closed and opened code::blocks and it worked and Compiled without problem. I don't know what was the problem. I didn't change anything.
You did change something. Please note that there are two places you have compiler settings:
case 1, Menu->Settings->Compiler settings. This is called "Global compiler settings", you have settings for every compilers, because there is a drop list "selected compiler" to let you select which compiler you are going to set.

case 2, Menu->Project->Build options, this will let you to select compiler to build your project and build targets.

I guess that in the "case 2", you have select "MS Visual C++" compiler for your "SayHi" project, apparently and luckily, your "greet" project use the GCC compiler.


Quote
I have another question. Where should I ask C++ code related question?
Use Google first, there are many answers but C::B forum is not involved.
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.