Author Topic: Cant Build/Run In Codeblocks  (Read 22664 times)

Offline dregs

  • Single posting newcomer
  • *
  • Posts: 2
Cant Build/Run In Codeblocks
« on: July 14, 2010, 12:25:43 am »
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

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: Cant Build/Run In Codeblocks
« Reply #1 on: July 14, 2010, 12:28:45 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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Cant Build/Run In Codeblocks
« Reply #2 on: July 14, 2010, 01:25:46 am »
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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline dregs

  • Single posting newcomer
  • *
  • Posts: 2
Re: Cant Build/Run In Codeblocks
« Reply #3 on: July 14, 2010, 02:32:37 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


Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: Cant Build/Run In Codeblocks
« Reply #4 on: July 14, 2010, 03:18:04 am »
strange one.

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

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Cant Build/Run In Codeblocks
« Reply #5 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" .

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Cant Build/Run In Codeblocks
« Reply #6 on: July 14, 2010, 04:59:09 pm »
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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

deepaksisodiya

  • Guest
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