Author Topic: re: I hate compilers  (Read 10135 times)

Anonymous

  • Guest
re: I hate compilers
« on: February 10, 2005, 08:29:20 pm »
Hi Yianni, et. al.

Let me start out by saying that I've been evaluating a bunch of these free IDE's cause, well, we won't get into the slipping value of my college education. I just wanted to say that I really appreciate the effort you've put forth here. I'm guessing that you are independantly wealthy since you have the time to put something like this together, and give it away. Three cheers for the open source community.

For my part though, I've been a day or so, now trying to get my dern little project to the form of a debug executable in the code::blocks environ (it works in Dev-C++/MinGW). If anyone could help me diagnose the following compiler output, I would appreciate tremendously. I'm not quite sure how to interpret the make err:

Project   : Project2
Compiler  : GNU GCC Compiler (using GNU "make")
Directory : D:\CodingStuff\Isolation Booth\
--------------------------------------------------------------------------------
Cleaning target "default"...
process_begin: CreateProcess((null), rm -f project2.exe .objs/component.o .objs/main.o, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make.exe: *** [clean_default] Error 2
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

~~~~~~ end listing ~~~~~~~~~~

Glad to hear that I'm not the only person who's spent time coding for money, and still has these problems... I think it comes from being spoon-fed by uncle bill at msft.

Thanks in advance for any help,

Johnny

Offline Urxae

  • Regular
  • ***
  • Posts: 376
re: I hate compilers
« Reply #1 on: February 10, 2005, 08:43:30 pm »
This is probably because you don't have MSYS installed (or don't have it in your PATH), so you don't have 'rm'.

Quick fix: In Settings -> Configure plugins -> Compiler, tab Custom variables, edit 'RM = rm -f' so it says 'RM = del /f'

Longer fix: Install MSYS. :D

Anonymous

  • Guest
re: I hate compilers
« Reply #2 on: February 10, 2005, 08:52:38 pm »
Thanks, I just saw it in a post from a couple weeks ago. I changed the RM value, and now get the following:

Project   : Project2
Compiler  : GNU GCC Compiler (using GNU "make")
Directory : D:\CodingStuff\Isolation Booth\
--------------------------------------------------------------------------------
Cleaning target "default"...
Invalid switch - "component.o".
mingw32-make.exe: *** [clean_default] Error 1
Process terminated with status 1 (0 minutes, 2 seconds)
0 errors, 0 warnings

~~~~~~~end listing~~~~~~~~~

Also, in Settings -> Configure plugins -> Compiler I keep telling it to use gdb.exe for my debugger. The value is not persistant. Each time I open the page, the value is blank again.

Offline Urxae

  • Regular
  • ***
  • Posts: 376
re: I hate compilers
« Reply #3 on: February 10, 2005, 09:25:03 pm »
Looks like you missed an 'f' at the end there, that would produce that error.
About gdb, I have the same problem...

Anonymous

  • Guest
re: I hate compilers
« Reply #4 on: February 10, 2005, 09:40:34 pm »
Hmm,... Now I'm really confused. I installed the MSYS deally in a subdir of MinGW, and put it's /bin dir in the path. The next attempt to compile didn't apear to like the RM = del /f, so I changed it back. Now I got the following output:

Project   : Project2
Compiler  : GNU GCC Compiler (using GNU "make")
Directory : D:\CodingStuff\Isolation Booth\
--------------------------------------------------------------------------------
Cleaning target default...
Compiling component.cpp...
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
mingw32-make.exe: [.objs/component.o] Error 258 (ignored)
In file included from component.cpp:3:
component.h:23: warning: `class CComponent' has virtual functions but
   non-virtual destructor
C:\DOCUME~1\jessica\LOCALS~1\Temp/cc8ybaaa.o(.text+0x2de): In function `ZN10CComponent14QueryInterfaceERK5_GUIDPPv':
D:/CodingStuff/Isolation Booth/component.cpp:40: undefined reference to `IID_IUnknown'
C:/MinGW/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libmingw32.a(main.o)(.text+0x97):main.c: undefined reference to `[email protected]'
mingw32-make.exe: *** [.objs/component.o] Error 1
Process terminated with status 1 (10 minutes, 4 seconds)
2 errors, 1 warnings

~~~~~ end listing ~~~~~~

fortunately, the compile took ten minutes, allowing me plenty of time to beat my head on the wall...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
re: I hate compilers
« Reply #5 on: February 10, 2005, 10:18:37 pm »
To correct the "undefined reference to IID_IUnknown" error, add -luuid in the project's linker options.
The "WinMain" error comes from one of two reasons:
a) you 're building a console project but have it setup as a GUI one in project's properties, or
b) you need to add -lmingw32 in the project's linker options

HTH,
Yiannis.
Be patient!
This bug will be fixed soon...

Anonymous

  • Guest
re: I hate compilers
« Reply #6 on: February 10, 2005, 10:38:58 pm »
Um, actually, we have been talking about this for a couple days, through other forum channels. I already have the -luuid in project linker options, and I already changed the project properties to reflect that it's a console app. Just for yucks, I now tried the -lmingw32 project linker option. All to no avail...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
re: I hate compilers
« Reply #7 on: February 10, 2005, 11:57:49 pm »
OK, go to global compiler options and change the logging level for GCC to "Full". Rebuild your project and post here the full build log. Maybe then we can see what's going on...

Yiannis.
Be patient!
This bug will be fixed soon...

Anonymous

  • Guest
re: I hate compilers
« Reply #8 on: February 11, 2005, 02:19:41 am »
Thanks, I came to the sad realization the other day, that I don't speak MAKE, an essential dialect for a serious code joc. As I said, probably due to coddling by MSomething over the years...


Project   : Project2
Compiler  : GNU GCC Compiler (using GNU "make")
Directory : D:\CodingStuff\Isolation Booth\
--------------------------------------------------------------------------------
rm -f project2.exe .objs/component.o .objs/main.o  
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
mingw32-g++.exe -Wall -g -pg -g -g -IC:/MinGW/include -IC:/MinGW/bin -IC:/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003/bin  component.cpp -o .objs/component.o
mingw32-make.exe: [.objs/component.o] Error 258 (ignored)
In file included from component.cpp:3:
component.h:23: warning: `class CComponent' has virtual functions but
   non-virtual destructor
C:\DOCUME~1\jessica\LOCALS~1\Temp/ccmccaaa.o(.text+0x2de): In function `ZN10CComponent14QueryInterfaceERK5_GUIDPPv':
D:/CodingStuff/Isolation Booth/component.cpp:40: undefined reference to `IID_IUnknown'
C:/MinGW/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libmingw32.a(main.o)(.text+0x97):main.c: undefined reference to `[email protected]'
mingw32-make.exe: *** [.objs/component.o] Error 1
Process terminated with status 1 (0 minutes, 6 seconds)
2 errors, 1 warnings

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
re: I hate compilers
« Reply #9 on: February 11, 2005, 10:16:20 am »
Have you messed with the advanced compiler options? I 'm asking 'cause there is "-c" missing from the command line. Just before "component.cpp"...
Go to "Settings/Configure plugins/Compiler", switch to the "Other" tab, click "Advanced options..." and post here the command for "Compile single file to object file". The GCC command is "$compiler $options $includes -c $file -o $object"...

Yiannis.
Be patient!
This bug will be fixed soon...

Anonymous

  • Guest
re: I hate compilers
« Reply #10 on: February 11, 2005, 06:31:09 pm »
I was getting a message that it couldn't  use both the -c, and -o with multipe targets, or something to that effect...

Anonymous

  • Guest
re: I hate compilers
« Reply #11 on: February 11, 2005, 06:36:15 pm »
So, yes I removed it:

$compiler $options $includes  $file -o $object

Anonymous

  • Guest
re: I hate compilers
« Reply #12 on: February 11, 2005, 06:55:51 pm »
So if I put it back, it compiles now, but the window comes up without the menus...

Anonymous

  • Guest
re: I hate compilers
« Reply #13 on: February 11, 2005, 08:08:10 pm »
Sorry, I'm a little rusty. I'll figure it out from here. Thanks.

Johnny