Author Topic: Help It wont compile / run?  (Read 7602 times)

Offline petfood56

  • Single posting newcomer
  • *
  • Posts: 7
Help It wont compile / run?
« on: July 22, 2010, 04:47:28 pm »
Well i started learning C++ yesterday and i wanted to test what i have learned so far by making something so i asked  someone what a good compiler / editor was and they said Code blocks so i downloaded it made something really simple i hit build and run and nothing happens i don't think it is the program i made because i have tried other things that people have made and it doesn't work. I'm using windows 7 64-bit (intel celeron processor) and the newest version of code blocks
« Last Edit: July 22, 2010, 04:49:11 pm by petfood56 »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Help It wont compile / run?
« Reply #1 on: July 22, 2010, 04:53:08 pm »
Quote
it doesn't work
We can't answer these kind of questions...
What exact steps you have play with C::B? please give more details.

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 petfood56

  • Single posting newcomer
  • *
  • Posts: 7
Re: Help It wont compile / run?
« Reply #2 on: July 22, 2010, 04:58:05 pm »
sorry when i say it doesn't work i mean nothing happens at all

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Help It wont compile / run?
« Reply #3 on: July 22, 2010, 05:02:18 pm »
Please note the program ESP plug-in is not working.

What did you do? That you expected something to happen.
What is your OS? Found windows 7 64-bit (intel celeron processor) in your post.
Compiler name and Version?
Code::Blocks version? Newest version is NOT an acceptable answer; unless you are building Code::Blocks from the SVN trunk and then I want an SVN value.

Please turn on Full Compiler Logging see Wiki FAQ for directions.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Please note: Your friend lied to you; Code::Blocks is an Editor/IDE it is NOT an compiler.

Tim S.

« Last Edit: July 22, 2010, 05:10:34 pm by stahta01 »
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 petfood56

  • Single posting newcomer
  • *
  • Posts: 7
Re: Help It wont compile / run?
« Reply #4 on: July 22, 2010, 05:09:14 pm »
I'm using GNU GCC compiler. i don't know what version it is D:
i expected it to show a number on screen i don't really know in what fashion
and i'm using version 10.05
« Last Edit: July 22, 2010, 05:11:17 pm by petfood56 »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Help It wont compile / run?
« Reply #5 on: July 22, 2010, 05:15:12 pm »
I'm using GNU GCC compiler. i don't know what version it is D:
i expected it to show a number on screen i don't really know in what fashion
and i'm using the newest version 10.05

You are most likely using an Old version on MinGW; but since you have no knowledge of it; this is just a guess based on the other newbies.

Find the compiler installation folder?
Open an CMD.exe window and cd to the compiler installation folder
Code
cd /d C:\Mingw
Then cd to the bin sub folder
Code
cd bin
The run gcc -v to get the version
Code
gcc -v
Then run g++ to get version and verify the file exists.
Code
g++ -v

Report both version numbers or the errors!

Tim S.
« Last Edit: July 22, 2010, 05:18:33 pm by stahta01 »
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 petfood56

  • Single posting newcomer
  • *
  • Posts: 7
Re: Help It wont compile / run?
« Reply #6 on: July 22, 2010, 05:22:15 pm »
the first thing you told me to type says cannot find path specified? does that mean i need to download it or something? i was never told to do this ):<
edit: that folder is in the codeblocks folder should i move it to that place on my harddrive?
« Last Edit: July 22, 2010, 05:24:54 pm by petfood56 »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Help It wont compile / run?
« Reply #7 on: July 22, 2010, 05:24:54 pm »
the first thing you told me to type says cannot find path specified? does that mean i need to download it or something? i was never told to do this ):<

Did you install a compiler?
If no, install one.
If yes, then USE the path of the compiler you installed!!!

Quote
edit: that folder is in the codeblocks folder should i move it to that place on my harddrive?
No, use the path to where it is installed!

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 petfood56

  • Single posting newcomer
  • *
  • Posts: 7
Re: Help It wont compile / run?
« Reply #8 on: July 22, 2010, 05:29:42 pm »
system cannont find the path specified again should i move it to C:\ to make things easier?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Help It wont compile / run?
« Reply #9 on: July 22, 2010, 05:30:36 pm »
system cannont find the path specified again should i move it to C:\ to make things easier?

No, I give up you need a person on site to help you type commands.

You should ask a person, on site, who knows the basics to help you find the problem.

If you can not CD to a folder you are not a person that can be help without more effort than I have time to give.

Tim S.
« Last Edit: July 22, 2010, 05:32:51 pm by stahta01 »
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 petfood56

  • Single posting newcomer
  • *
  • Posts: 7
Re: Help It wont compile / run?
« Reply #10 on: July 22, 2010, 05:32:38 pm »
ugh D:

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Help It wont compile / run?
« Reply #11 on: July 22, 2010, 05:56:04 pm »
Go to "Settings -> Compiler and debugger -> Global compiler settings -> GCC -> Toolchain executables" and try autodetect of the compilers installation dir.
If that does not work, you have to chose it manually (it should be the one you found below C::B's folder, do not use the bin-folder, but the one that contains it).

Offline petfood56

  • Single posting newcomer
  • *
  • Posts: 7
Re: Help It wont compile / run?
« Reply #12 on: July 23, 2010, 06:28:27 am »
ty so much it works now :D now im on my way to making awesome stuffz lol