The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
June 26, 2019, 09:05:35 pm
Home Help Search Login Register
News: Paul Reiche and Fred Ford want to continue the story they started when they created Star Control II — The Ur-Quan Masters. «Happy days and jubilation!» «But wait!» «There is something wrong here... something which makes my sheath retract and my talons ooze.» «Please, Captain, we need your help!»

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Linker error; "Unresolved reference to _main&
« previous next »
Pages: [1] Print
Author Topic: Linker error; "Unresolved reference to _main&  (Read 2360 times)
abcminiuser
Zebranky food
*
Offline Offline

Posts: 10


I love YaBB 1G - SP1!


View Profile
Linker error; "Unresolved reference to _main&
« on: June 26, 2005, 04:57:40 pm »

If I use the simple C++ code:

#include <stdio.h>
#include "SDL.h"

int main (int argc, char *argv[])
{
fprintf (stderr, "Test");

return(0); // Satisfies Compiler (Main() must return a value)
}


I get the error "LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup" when building in VC++.Net. Can anyone explain this? The code works fine if I don't include the SDL.h header file.

- Dean :twisted:
Logged
abcminiuser
Zebranky food
*
Offline Offline

Posts: 10


I love YaBB 1G - SP1!


View Profile
Re: Linker error; "Unresolved reference to _m
« Reply #1 on: June 26, 2005, 05:15:33 pm »

Never mind: I forgot I had to use the

#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")

commands. Thanks anyway guys!
- Dean :twisted:
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!