User forums > Help

Linking Console Executable

(1/3) > >>

like2program:
I can't compile an irrXML.cpp into irrXML.lib.
It should work and the code looks OK.
It would be great if someone could help.
Error Log:
Compiling: C:\Paintball Project\irrLicht\irrxml-1.2\src\irrXML.cpp
Linking console executable: C:\Paintball Project\irrLicht\irrxml-1.2\src\irrXML.exe
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../libmingw32.a(main.o):main.c:(.text+0x104): undefined reference to `_WinMain@16'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings
From the looks of it Code::Blocks is broken...

MortenMacFly:

--- Quote from: like2program on March 09, 2008, 02:34:53 pm ---Linking console executable: C:\Paintball Project\irrLicht\irrxml-1.2\src\irrXML.exe

--- End quote ---
You are *not* linking to a library but an executable (application). Thus you either need a main routine or you change your project setup to be a library project.

like2program:
How would I change it to a library?

Seronis:
'Project' menu -> 'Properties' menu option -> 'Build Targets' tab

Right side of the dialog, 2nd field, is a pull down menu.

like2program:
I can't click on properties.
It's un-selectable.

Navigation

[0] Message Index

[#] Next page

Go to full version