User forums > Help

re: I hate compilers

<< < (2/3) > >>

mandrav:
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.

Anonymous:
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...

mandrav:
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.

Anonymous:
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 `WinMain@16'
mingw32-make.exe: *** [.objs/component.o] Error 1
Process terminated with status 1 (0 minutes, 6 seconds)
2 errors, 1 warnings

mandrav:
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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version