Code::Blocks Forums

User forums => Help => Topic started by: rahul.6sept on January 21, 2019, 05:49:50 pm

Title: How to run c++ program in code block?
Post by: rahul.6sept on January 21, 2019, 05:49:50 pm
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
 
Title: Re: How to run c++ program in code block?
Post by: BlueHazzard on January 22, 2019, 02:09:32 pm
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
Title: Re: How to run c++ program in code block?
Post by: ishan c++ on January 26, 2019, 04:46:24 am
my compiler can't load, what should i do?
Title: Re: How to run c++ program in code block?
Post by: BlueHazzard on January 26, 2019, 12:50:33 pm
Quote
my 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...
Title: Re: How to run c++ program in code block?
Post by: 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.
Title: Re: How to run c++ program in code block?
Post by: RyanR on March 01, 2019, 06:14:33 pm
so, I'm getting 
Quote
The 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?
Title: Re: How to run c++ program in code block?
Post by: RyanR on March 01, 2019, 06:30:09 pm
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!
Title: Re: How to run c++ program in code block?
Post by: RyanR on March 01, 2019, 07:07:22 pm
no such luck :-[  Now, instead of looking for the intel compiler, it's looking for Cygwin. can someone please shoot me? :-\
Title: Re: How to run c++ program in code block?
Post by: RyanR on March 01, 2019, 07:09:24 pm
I'm starting to think the only thing that will fix this is Del C:/*.*  :'(
Title: Re: How to run c++ program in code block?
Post by: RyanR on March 01, 2019, 07:29:42 pm
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  ::)
Title: Re: How to run c++ program in code block?
Post by: BlueHazzard on March 01, 2019, 07:47:45 pm
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
Title: Re: How to run c++ program in code block?
Post by: RyanR on March 01, 2019, 07:59:12 pm
I think I must be on some hidden camera show or something... I'm getting Punk'd...

Title: Re: How to run c++ program in code block?
Post by: RyanR on March 01, 2019, 08:00:48 pm
I just did a full clean install of Codeblocs and MinGW.... surprise surprise... Still nothing! >:(
Title: Re: How to run c++ program in code block?
Post by: 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.
Title: Re: How to run c++ program in code block?
Post by: rcttsoul on March 01, 2019, 08:39:08 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
Title: Re: How to run c++ program in code block?
Post by: BlueHazzard on March 01, 2019, 09:56:15 pm
@RyanR
You can create a other 100 posts with lamenting, but we can not help you with this  kind of posts....
Describe the exact errors you get, make screenshots, describe what you want to do...
If you have compiling errors post a full rebuild log:
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

You can reinstall codeblocks 100 times but it won't help... You can try to delete the config folder in %APPDATA%/codeblocks (if you are using windows)
Describe your problem as detailed as possible and we help you...