Error: Unresolved external '_main'

Started by
8 comments, last by noiser 22 years, 8 months ago
Hi ... Newbie here and I registrated today ... Now to my problem ... im currently testing Nehe:s Opengl tutorials and when I tries to compile the cpp code I gets this message: Error: Unresolved external ''_main'' referenced from C:\BC\LIB\C0X32.OBJ Does anyone know why I get it and what I should do to get ride of it ??? (Getting a little mad because I just spent 3 hours trying to make all the lib files and such to work(Which they does now))
Advertisement
You created a console application, you need to create a Win32 application (for the project).

------------------------------
Trent (ShiningKnight)
E-mail me
Shining Darkness- A division of Chromesphere Studios
..........!!!!!!!........... LOL !!!
I didnt thought of that ... Thanks .. ! ..
hmm ... Yet another newbie question ...

Error: Unresolved external ''auxDIBImageLoadA'' referenced from D:\CPP LÄXA\LESSON19\TEST.OBJ

I get this error when trying to compile the code from lesson 19 ... Got any clue of whats wrong =?=
You need to link glaux.lib to your project. You can do that in the project options.
Hi,

You have to link it to glaux.lib.
Go to project->settings->link(I think), read the Nehe-1st chapter.
Hello from my world
Yea ... But the tutorial only shows how to do it for visual c++ ... And Im using Borland c++ 5.02 ...

Edited by - noiser on August 9, 2001 5:15:45 AM
I am only used to borland''s commandline compiling.

The way to do is
1) pragmas - add the following at the start of the code
#pragma comment(lib, "PATH/LIBRARY")
#pragma comment(lib, more libraries)

Path = directory of library.

2) use -LPATH -lLibrary
Hello from my world
Error: ''C:\BC5\LIB\GL\GLAUX.LIB'' contains invalid OMF record, type 0x21

Error: ''C:\BC5\LIB\GLAUX.LIB'' contains invalid OMF record, type 0x21

It makes no differense which one I choose ...


One problem solved ... Another one appers ...
Any clues ???

(Wants visual c++, But only got Borland)
Your glaux.lib is in coff format, not omf format. Run coff2omf.exe on it, or find a borland-compatible glaux.lib on the internet.

This topic is closed to new replies.

Advertisement