Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

BLurnewbie

2 errors i can't solve

This topic is 5802 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Linking... LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/ftg.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. ftg.exe - 2 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites
Advertisement
I''m a newbie to Windows programming myself, but from looking at that it looks like you are trying to compile your library as an application.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Search Google, and you''ll find your solution.

Share this post


Link to post
Share on other sites
You might have forgotten your WinMain() funktion in your app.

[edited by - Jonus on September 1, 2002 7:50:50 PM]

Share this post


Link to post
Share on other sites
BLur: Post your code if it isn''t too big. I''m not certain what you did wrong, but I have suspicions that''ll require a bit of explanation if allayed.

For now, understand that you''ll almost definitely want to create your OpenGL applications as "Win32 Application"''s instead of "Win32 Console Application"''s. This will require you to know Win32 programming and write a WinMain.

Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

Share this post


Link to post
Share on other sites
They have internet in antarctica??



"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I'm reaching up and reaching out. I'm reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one's been. We'll ride the spiral to the end and may just go where no one's been." - Maynard James Keenan
[TheBlackJester ]
[Wildfire Studios ]

[edited by - TheBlackJester on September 1, 2002 10:42:11 PM]

Share this post


Link to post
Share on other sites
Try choosing the option to recompile all files. Sometimes you will get the error if your main file is compiled and you try to recompile another file that is linked into the main file.

Share this post


Link to post
Share on other sites
try this at the top of your main source file :

#pragma comment( linker, "/ENTRY:WinMainCRTStartup" )
#pragma comment( linker, "/SUBSYSTEM:WINDOWS" )

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You need to insert
#include "windows.h"

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by BLurnewbie
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/ftg.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

ftg.exe - 2 error(s), 0 warning(s)


This error happens when you have created the wrong msvc project type. Any programs that contain a main() function are "win32 console applications" Any programs that contain a WinMain() function are "win32 applications" It appears that you created a win32 application, and your code only contains a main() function. main() is not the right entry point for this type of application, so the compiler gets confused and will not compile the code giving you the error you see above.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!