News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

How to run c++ program in code block?

Started by rahul.6sept, January 21, 2019, 05:49:50 PM

Previous topic - Next topic

rahul.6sept

Dear all,

     I'm new to code block. I want to run c++ program in this.

  I went to setting - compiler - added clang compiler. But it shows error msg " Can't find compiler executable in your configured search path's for GNU GCC Compiler".

Kindly guide me.

Regards,

Rahul

BlueHazzard

You have to select the right compiler for your project:
Project->Build options->select the the project name on the left->Select your clang compiler from the dropdown list

ishan c++

my compiler can't load, what should i do?

BlueHazzard

Quotemy compiler can't load, what should i do?
Is not a error message or error description.
You do not say what does not work or load, how this manifests and what the problem is.
Without detailed error message, procedure how to trigger this error, your tries to fix it, and more information about your environment we can not help...

rcttsoul

what is happening to all these people is that they are downloading the CodeBlocks/MinGW package, it is jacked up as I ran into this same problem and took me 5 hours to figure it out, I found these videos on YouTube that helped me fix my problems and how to properly install both MinGW and CodeBlocks.
as the bundle download is messed up, and the install instructions are incorrect and lacking information, it is causing all these people to have the same problem.
Discord = Pryor#2941

RyanR

so, I'm getting 
QuoteThe compiler's setup (Intel C/C++ Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
But I'm not even using the intel compiler. I'm using gnu g++ from the MinGW package which is auto recognized by C::B but still "no-go" any guesses why?

RyanR

Quote from: rcttsoul on March 01, 2019, 09:41:58 AM
what is happening to all these people is that they are downloading the CodeBlocks/MinGW package, it is jacked up as I ran into this same problem and took me 5 hours to figure it out, I found these videos on YouTube that helped me fix my problems and how to properly install both MinGW and CodeBlocks.
as the bundle download is messed up, and the install instructions are incorrect and lacking information, it is causing all these people to have the same problem.
With that confirmation, I do believe i'm going to uninstall and re-install both separately and see if that helps. Wish me luck!

RyanR

no such luck :-[  Now, instead of looking for the intel compiler, it's looking for Cygwin. can someone please shoot me? :-\

RyanR

I'm starting to think the only thing that will fix this is Del C:/*.*  :'(

RyanR

I went through and uninstalled/deleted everything to do with C::B MinGW and Cygwin. going to try one more time with a completely fresh install  ::)

BlueHazzard

You get this error message probably because you have set the intel compiler as default.
To fix this go into Settings->Compiler->Select the mingw gcc compiler from the drop down list->set as default (there should be a button to press)->Close dialog with Ok
Now all new projects should use gcc as default

RyanR

I think I must be on some hidden camera show or something... I'm getting Punk'd...


RyanR

I just did a full clean install of Codeblocs and MinGW.... surprise surprise... Still nothing! >:(

RyanR

https://sourceforge.net/projects/mingw-w64/
https://sourceforge.net/projects/codeblocks/

are these not the right ones???  I don't know what I'm missing here... It has to be something random in the compiler congiguration or... I don't even know.

rcttsoul

Quote from: RyanR on March 01, 2019, 08:12:25 PM
https://sourceforge.net/projects/mingw-w64/
https://sourceforge.net/projects/codeblocks/

are these not the right ones???  I don't know what I'm missing here... It has to be something random in the compiler congiguration or... I don't even know.

first uninstall Codeblocks mingw bla bla, the Codeblocks MinGW bundle download is messed up.
Now install MinGW separately and first...... https://osdn.net/projects/mingw/releases/
Now download and install Codeblocks ONLY ..... http://sourceforge.net/projects/codeblocks/files/Binaries/17.12/Windows/codeblocks-17.12-setup.exe

And here are some videos that will actually show you the secrets on how to........ set everything up shhhhh
setup of MinGW https://www.youtube.com/watch?v=sXW2VLrQ3Bs&t=249s
setup of CodeBlocks https://www.youtube.com/watch?v=c8iq3yg6RDM&t=8s
Discord = Pryor#2941