News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Cant Build/Run In Codeblocks

Started by dregs, July 14, 2010, 12:25:43 AM

Previous topic - Next topic

dregs

Hey there i am trying to learn C++ so i downloaded the codeblocks dev environment. i downloaded it in conjunction with a mingw32 compiler set. but i dont know why i cannot build or run any tests. i put in that basic code for "hello world" in cmd.exe but it doesnt even run THAT. and thats like the default project. i enter code, code is absolutely correct, and then i select "Build" or "Build and Run" and its not working. when i hit F9 or "build and run" it brings up a little button window that says "It seems that this project has not been built yet. Do you want to build it now?"
it gives me three options: yes no or cancel.
i obviously hit "yes" and then it says this in the build log at the bottom:
"Compiling: main.cpp
mingw32-gcc.exe: installation problem, cannot exec `cc1plus': No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
"

what am i doing wrong? i set everything up correctly, i didnt change any settings directories or options that weren't instructed by this page.     http://www.cprogramming.com/code_blocks/
so im pretty sure that i set it up perfectly.

i read a post with a similar problem but it started to diverge and lead to irrelevant info. so if anyone could help me figure out why my codeblocks is not recognizing my mingw32 compiler i would greatly appreciate it. Or if anyone knows of an easier program to use, or anything that would help me learn C++ faster and be able to use a simple program for testing my codes and programs for practice i would love that also. thanks.  i really want to learn C++ lol

kencamargo

Quote from: dregs on July 14, 2010, 12:25:43 AM
what am i doing wrong?

Apparently code::blocks doesn't know where your c++ compiler is (and probably all the toolchain). I'd suggest downloading and installing the full c::b + mingw package and using it, so as to minimize install errors.

Ken

stahta01

Warning Please read: If using Vista or Windows 7 the version of Mingw with 8.02 is NOT Vista/Win 7 Compatible!

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

dregs

Quote from: kencamargo on July 14, 2010, 12:28:45 AM
Quote from: dregs on July 14, 2010, 12:25:43 AM
what am i doing wrong?

Apparently code::blocks doesn't know where your c++ compiler is (and probably all the toolchain). I'd suggest downloading and installing the full c::b + mingw package and using it, so as to minimize install errors.

Ken
yea i did download that pack. it came with codeblocks and mingw32 and i installed it perfectly. i think i said that already but idk lol but i think all my toolchains are correct. how is that toolchain screen supposed to look?

this is what mine looks like lol


reckless

strange one.

i see you use XP so even the old gcc should be fine. do you by any chance have other mingws installed ?.

Jenna

Check the compiler installation directory.
The MinGW version coming with C::B will normally be installed below C::B's executable folder (by default "C:\Program Files\Codeblocks\MinGW" ) and not in "C:\MinGW" .

stahta01

Quote from: jens on July 14, 2010, 09:58:23 AM
Check the compiler installation directory.
The MinGW version coming with C::B will normally be installed below C::B's executable folder (by default "C:\Program Files\Codeblocks\MinGW" ) and not in "C:\MinGW" .

Note: If using an MinGW Compiler that is NOT in "X:\MinGW" the folder "X:\MinGW" must not exist!
(Where X is any drive letter)

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

deepaksisodiya

if code blocks shows a msg like this.....It seems that this project has not been built yet. Do you want to build it now?
it means u dont have g++ install
solution= go to application then accessories then open terminal....it depend on ur OS iam using
ubuntu 10.10
then in terminal type sudo apt-get install g++
after installing u r ready to use codeblocks...........
if ur problem is solve ..plz remember to thanks me.......k