User forums > Help

Can't build, run, or compile.

(1/3) > >>

pyro_854:
I'm using Code Blocks to learn C++. I wrote the "Hello world!" app. (I used "Poo!") Now when I click run it says "It seems that this project has not been built yet. Do you wish to build it now?"... If I click "yes" the mesage box closes and nothing happens... if I click "No" it opens a command prompt window that says "Press any key to continue." if I press a key it closes... there is also a cancel button.

MortenMacFly:

--- Quote from: pyro_854 on August 23, 2006, 09:51:48 pm ---I wrote the "Hello world!" app. (I used "Poo!")

--- End quote ---
If it's such an easy (small) project could you add it as an attachment (ZIPped) to another post? We don't know anything about your configuration (OS, Compiler/version, C::B/version and others). The basic information you give is "My project doesn't work." with no further reference. I doubt there is a way to give a good answer to this. ;-)
With regards, Morten.

pyro_854:
Windows XP Pro, C::B August 22, 2006 build, MinGW.

I'm new to programing, I'm not sure if I have evrything I need.

EDIT: I also have Open Watcom

MortenMacFly:

--- Quote from: pyro_854 on August 23, 2006, 10:30:07 pm ---Windows XP Pro, C::B August 22, 2006 build, MinGW.

--- End quote ---
What does mingw mean? Mingw itself comes without any compiler. I guess you want to compile against gcc. What happens if you type "gcc --version" in a console? Did you actually install any gcc/g++ packages? Did you setup the compiler(s) corectly in C::B? What about the ZIPed project attached to the next post? This would really make things a lot easier.
With regards, Morten.

pyro_854:
I found the messages window... this is what it says:
----
poo.c:3: iostream: No such file or directory
poo.c:4: error: syntax error before "namespace"
poo.c:4: warning: type defaults to `int' in declaration of `std'
poo.c:4: warning: data definition has no type or storage class
poo.c:8: error: `cout' undeclared (first use in this function)
poo.c:8: error: (Each undeclared identifier is reported only once
poo.c:8: error: for each function it appears in.)
:: === Build finished: 5 errors, 2 warnings ===
----

I used the mingw.exe file to install gcc. I also have a gcc tar.gz file but it doesn't have an installer... do I need it? If so where should I extract to. How do I setup the compiler in C::B?

[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

Go to full version