Author Topic: I can't compile  (Read 10078 times)

Offline stufava

  • Single posting newcomer
  • *
  • Posts: 9
I can't compile
« on: February 05, 2009, 04:45:24 pm »
when i try to compile my project i'm given this error:


Code
-------------- 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!

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I can't compile
« Reply #1 on: February 05, 2009, 05:13:05 pm »
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.

Offline stufava

  • Single posting newcomer
  • *
  • Posts: 9
Re: I can't compile
« Reply #2 on: February 05, 2009, 05:24:03 pm »
Code
-------------- 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...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I can't compile
« Reply #3 on: February 05, 2009, 05:32:38 pm »
Move your project to a folder without spaces and try it again.

Offline stufava

  • Single posting newcomer
  • *
  • Posts: 9
Re: I can't compile
« Reply #4 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:

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I can't compile
« Reply #5 on: February 05, 2009, 05:46:51 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.

Offline stufava

  • Single posting newcomer
  • *
  • Posts: 9
Re: I can't compile
« Reply #6 on: February 05, 2009, 05:57:51 pm »
i tried but it's still not working, the error is the same
p.s.:yes italian is correct.. :D

Offline stufava

  • Single posting newcomer
  • *
  • Posts: 9
Re: I can't compile
« Reply #7 on: February 05, 2009, 05:59:14 pm »
Code
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...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: I can't compile
« Reply #8 on: February 05, 2009, 06:07:20 pm »
Can you pack your project (if it is not too large) with zip or 7z and attach it ?

Offline stufava

  • Single posting newcomer
  • *
  • Posts: 9
Re: I can't compile
« Reply #9 on: February 05, 2009, 06:12:31 pm »
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

  • Guest
Re: I can't compile
« Reply #10 on: February 05, 2009, 09:23:18 pm »
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

Offline stufava

  • Single posting newcomer
  • *
  • Posts: 9
Re: I can't compile
« Reply #11 on: February 06, 2009, 10:48:32 am »
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:

Code
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?

Offline rcoll

  • Almost regular
  • **
  • Posts: 150
Re: I can't compile
« Reply #12 on: February 07, 2009, 06:35:09 am »
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