Jump to content

  • Log In with Google      Sign In   
  • Create Account


Error in Visual C++?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 phantom1   Members   -  Reputation: 122

Like
Likes
Like

Posted 05 January 2000 - 05:51 PM

I''m new to programming with opengl and glide. I use Visual C++ 5.0 to compile my programs. But for some reason, any time I write an opengl or glide program it gives me a error such as "unresolved external symbol __winmain@16.". Or something like that. Like I said, I''m new and can''t figure out whats causing this. Anyone who has had this problem please let me know how you fixed it.

Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9500

Like
Likes
Like

Posted 05 January 2000 - 06:12 PM

Are you sure you''re linking in the GL/glide lib files?

#3 phantom1   Members   -  Reputation: 122

Like
Likes
Like

Posted 06 January 2000 - 03:12 AM

Yeah, I''m sure. I put glide3x.lib under project/settings/link under object/library modules.

#4 ZomeonE   Members   -  Reputation: 122

Like
Likes
Like

Posted 06 January 2000 - 03:20 AM

Are you sure you''re trying to compile a win32 (not command line) project?

#5 phantom1   Members   -  Reputation: 122

Like
Likes
Like

Posted 06 January 2000 - 09:47 AM

Yep. Win32 app and linking to glide for sure. I read somewhere ( some other message board I believe ) that you needed to include dinput.h (or something like that) in your app. But tried that and it didn''t work.

#6 NightShade   Members   -  Reputation: 122

Like
Likes
Like

Posted 06 January 2000 - 11:25 AM

Maybe I misread soemthing or am missing the point, but I get this error:
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16

if I misspell or omit the function:
int PASCAL WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
(Which is analogous to the main() of a console app)

Maybe this''ll help, I''m just covering the most obvious base first
-ns



#7 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 07 January 2000 - 03:53 AM

I got that message before (since I''m new as well), and I think you need to write a WinMain function (the return type is very long and I don''t remember it off-hand. Try looking for some tutorials around with that function). If you have that function in, the error won''t appear (I think... I''ve tried lots of things and this is one of them. I''m not 100% sure if this is the exact solution or not)




#8 sherman   Members   -  Reputation: 151

Like
Likes
Like

Posted 07 January 2000 - 06:41 AM

Being a Glide/OpenGL programmer you may have come from a Unix/Linux background so you may need to pick up a little bit of Win32. I am not questioning your abilities so please don''t flame me =)

Best regards,
Sherman



#9 ZomeonE   Members   -  Reputation: 122

Like
Likes
Like

Posted 07 January 2000 - 06:51 AM

Didn''t you have a WinMain function?

I thought so...

You gotta have it you know, when you write win32 programs.

#10 phantom1   Members   -  Reputation: 122

Like
Likes
Like

Posted 07 January 2000 - 07:42 AM

I won''t flame ya'' Sherman.
I have the winmain function included. I fixed my problem though so everythings ok. It seems that when I was downloading source code from the net and opening it in VC++,
it was opening it as a console app. Don''t know why but thats what it was doing. Thanks for the help guys.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS