Jump to content

  • Log In with Google      Sign In   
  • Create Account


Do I need another library linked? unresolved external symbol _main


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
2 replies to this topic

#1 blueboycurtis   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 October 2001 - 11:09 PM

Ok, umm... well, I was informed how to manually link libraries from a user here on GDNet, which is great (I have TWO BOOKS on Visual C++, and two books on windows game programming, and NONE of them -- including the one by Dave Astle and Kevin Hawkins -- bothers to deal with the library linking that you MUST do to make things work)... now I still get a message about "unresolved external symbol _main" I assume this has to do with my use of int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) Is there another standard windows library that I need to link? The books make no mention of this, but linking the OpenGL libraries got rid of the unresolved symbols for the WGL calls... now what about that _main thing??? Edited by - blueboycurtis on October 19, 2001 6:10:22 AM

Sponsor:

#2 xstreme2000   Members   -  Reputation: 152

Like
Likes
Like

Posted 18 October 2001 - 11:34 PM

I believe I can help you.

The problem is (I think) that you have create a console application. When you write a console application you must have a

void main()

function, not a WinMain. As I assume you want to write a window application, you must specify "Win32 Application" (NOT CONSOLE) when you create a new project then you can use the WinMain(...) fuction.

The other reason this could have happened is if you never created a Project and just made a .cpp file and hit build.

What I recomend you do is create a new Windows project copy your source files into the project directory then select to add them to you project (Maybe Tools->Add to project->Files... I can''t remember right now) then your ready, hit build and run your code

Good luck
X2K

PS: if you can''t understand my description email me at tom.oram@vizzavi.co.uk and I explain when I''m infront of a windows PC with MSVC++ on it and I can tell you the exact menu names you need to click

#3 blueboycurtis   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 October 2001 - 12:13 AM

I understand... thanks. I actually did not specify a project -- just went ahead and made a CPP, so it didn''t know which types of libraries to use I guess. There is a way to manually set all this stuff, but looks like the easiest route is to use a project to have everything set up (I haven''t used VC++ in years, so I am getting used to this)

Thanks! This forum is great!




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