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

I can't compile

Started by stufava, February 05, 2009, 04:45:24 PM

Previous topic - Next topic

stufava

when i try to compile my project i'm given this error:


-------------- Build: Debug in project ---------------

Compiling: main.cpp
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings


I searched in this forum other topics with similar problems and i found many ones, but most of these concern windows vista or other SO;
i couldn't find out a solution! I have Windows XP, Code::Blocks and MinGW compiler.
Thanks in advance!

Jenna

Please turn on full commandline logging:

Change "Settings -> Compiler and debugger... -> Global compiler settings -> Other settings(rightmost tab) -> Compiler logging" to "Full commandline" and post the content of the build log.

stufava

-------------- Build: Debug in project ---------------

mingw32-g++.exe -Wall -fexceptions  -g    -IC:\Programmi\CodeBlocks\MinGW  -c "C:\Documents and Settings\Stefano\Desktop\programmazione\project\main.cpp" -o obj\Debug\main.o
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings


here it is...

Jenna

Move your project to a folder without spaces and try it again.

stufava

sorry but often english and I doesn't doesn't get on well :( :(... can you explain what your last reply means (In other words)? :lol:

Jenna

Quote from: stufava on February 05, 2009, 05:39:21 PM
sorry but often english and I doesn't doesn't get on well :( :(... can you explain what your last reply means (In other words)? :lol:

Move your project from "C:\Documents and Settings\Stefano\Desktop\programmazione\project\" to (for example) "C:\programmazione\project\".

I tried to use a translator to find the italian word (is italy correct ?), it gave me "spazio in bianco". Ascii character 32 or 0x20 or just " ".

It's most likely a MinGW-problem.

I hope this helps.

stufava

i tried but it's still not working, the error is the same
p.s.:yes italian is correct.. :D

stufava

mingw32-g++.exe -Wall -fexceptions  -g    -IC:\Programmi\CodeBlocks\MinGW  -c C:\programmazione\project\main.cpp -o obj\Debug\main.o
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings


if this can help...

Jenna

Can you pack your project (if it is not too large) with zip or 7z and attach it ?

stufava

sure.. it's not too large... it's quite a simple project, and i've not completely finished it, but the main structure should be this...

[attachment deleted by admin]

Max

Ciao,

I think the problem is in both the sorce code and in the old compiler you are using (3.4.5). With that version of the compiler I got the same strange behavior. Upgrade to 4.2.1 and you get a lot of errors and warnings.

Using GCC 3.4.5 the compiler returns 0x01 flagging an error. No exe is created. I think you are triggering a bug in the compiler with your buggy code. Upgrade the compiler to 4.2.1 (easy to do with packages located in www.mingw.org) and fix your code.

Hope this helps

Max

stufava

ok, i've done it.
I set the upgraded version of MinGW, but i can't understand which executable in the "lib" folder of MinGW is the "debugger" one.. with the old versione i had "gdb.exe"... however i've fixed my code and my program has been built!! The only problem now is this: if i run it, the .exe starts and immediately stops, reporting this error:

Checking for existence: C:\programmazione\project\bin\Debug\project.exe
Executing: "C:\Programmi\CodeBlocks/cb_console_runner.exe" "C:\programmazione\project\bin\Debug\project.exe"  (in C:\programmazione\project\.)
Process terminated with status -1073741571 (2 minutes, 40 seconds)


where i was wrong?

rcoll

Actually, I don't see how this can work.  You have classes (for example "data" and "persona") that include themselves inside their own definition.  Doesn't this make a recursive definition?  How does the compiler ever know when to stop?

Try re-structuring your classes into smaller, more manageable definitions, then try it again.

Ringo