Notices

Overclockers Forums > Software > Programming Tips and Tricks
Programming Tips and Tricks
Forum Jump

Linker error with VisualStudio 2010

Post Reply New Thread Subscribe Search this Thread
 
 
Thread Tools
Old 08-20-10, 01:09 PM Thread Starter   #1
Dooms101
Member


 
Dooms101's Avatar 

Join Date: Dec 2009
Location: under a heatsink

 
Linker error with VisualStudio 2010


Hey everyone, I haven't posted my programming questions here before since I usually use stackoverflow, but I figured I'd ask here first.

So I am trying to compile a VC++ project in MS Visual Studio 2010 Pro, and I keep getting a LNK1561 error (means the linker couldn't find the main entry point.) I can't seem to figure out why, I do have a main function defined such as:
Code:
int main (int argc, char* args[]) {
    //code here...
    return 0;
}
This how I always define my entry points when using SDL and other APIs... but for some reason it just can't find it. I made the project using an empty VC++ project since I am only using SDL, SDL_Image, SDL_Mixer, and SDL_TTF. All my *.lib's are referenced and everything... so I don't think that's the problem. Is there anyway to manually specify the entry point to the linker/compiler? Thanks

__________________
[Dell Latitude E6420]............................[i5-2450M 2.5Ghz, 8GB DDR3, 500GB]
Area51 Case Mod - ODD Window Mod - Dolk's Phenom II Guide - NZXT Phantom Triple Rad
Dooms101 is offline   QUOTE Thanks
Old 08-21-10, 08:58 AM   #2
Cowboy Shane
Member



Join Date: Jan 2002
Location: Augusta, GA

10 Year Badge
 
I have been playing with the stupid thing and can't find how to manually specify the entry point. If you create a console app, it defines int _tmain as the entry point. Maybe you could start from a console app and add the things you need?

__________________
I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours. -- Stephen Roberts
Cowboy Shane is offline   QUOTE Thanks
Old 08-21-10, 10:30 AM Thread Starter   #3
Dooms101
Member


 
Dooms101's Avatar 

Join Date: Dec 2009
Location: under a heatsink

 
Yeah I messed around with the Entry point option in the linker settings and it just doesn't work... I eventually did find my problem though, I specified the wrong sub system, woopsy

__________________
[Dell Latitude E6420]............................[i5-2450M 2.5Ghz, 8GB DDR3, 500GB]
Area51 Case Mod - ODD Window Mod - Dolk's Phenom II Guide - NZXT Phantom Triple Rad
Dooms101 is offline   QUOTE Thanks

Post Reply New Thread Subscribe


Overclockers Forums > Software > Programming Tips and Tricks
Programming Tips and Tricks
Forum Jump

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Mobile Skin
All times are GMT -5. The time now is 03:45 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
You can add these icons by updating your profile information to include your Heatware ID, Benching Profile ID or your Folding/SETI profile ID. Edit your profile!
X

Welcome to Overclockers.com

Create your username to jump into the discussion!

New members like you have made this the best community on the Internet since 1998!


(4 digit year)

Why Join Us?

  • Share experience
  • Max out your hardware
  • Best forum members anywhere
  • Customized forum experience

Already a member?