OpenGL Linking error?

Started by
5 comments, last by Maxfreilich 20 years, 1 month ago
Hey, I have been working with some simple window code for an opengl application, which is based off of Nehe's code. When I try to build the application, I get an error saying: LINK : fatal error LNK1104: cannot open file "and.obj" I have been working for a little while, and I can't find out what and.obj is, or what it has to do with my program. Does anyone know what's goin on here? Thanks for your help. Sry I forgot, I am using VC++ 6 [edited by - Maxfreilich on February 28, 2004 10:50:37 AM]
Advertisement
Press Alt-F7 to open the project settings -dialog. Select the Link -tab and remove and.obj from the Object/library modules -list. Now you should be able to figure out what it should do by examining the linker error messages.
Wow I have no idea why "and" was in there. Oh well. Hmm but now when I try to run it, I get two more errors:

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/GLWindowBase.exe : fatal error LNK1120: 1 unresolved externals

Any idea what that is about?
Hmm, it seems it contains the main() function...
Could you tell exactly what code base you are using?
Well considering there is no main function (there is WinMain) I dont know what the problem is. I am using the Nehe Basecode - Slightly modified but nothing critical.
Well, press Alt-F7 again.
On the Link tab there is a textbox labeled "Project Options".
If there's a parameter /subsystem:console you should change it to /subsystem:windows .
This parameter is automatically set when you create a project and it depends on whether you select WIN32 or Console app. WIN32 apps (/subsystem:windows) want a function called WinMain() and console apps want main().

EDIT: typo
EDIT: another one


[edited by - nonpop on February 28, 2004 11:28:46 AM]

[edited by - nonpop on February 28, 2004 11:29:38 AM]
Yeah thats sort of embarrassing...I accidentally created a console application because I am so used to just doing console. Thanks for your help! Sorry for wasting your time.

This topic is closed to new replies.

Advertisement