0

I've been trying to setup Visual studio to work with SDL2, but I've encountered a problem. I've done all the linking and stuff, and everything works fine if I link the x86 libs.

However, if I only change this bit, meaning I link to the x64 libs (I'm on windows 8 64 bits) everything stops working. That's the errors I get :

Source.obj : error LNK2019: unresolved external symbol _SDL_Init referenced in function _SDL_main

and other similars, and a last one, a bit different :

1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

I really don't know why, since I didn't change a bit of code going from 32 to 64, if anyone has a solution, otherwise I'll juste use the 32bit libs...

If you need additionnal information I can gladly provide.

Martin G
  • 17,357
  • 9
  • 82
  • 98
Frotaur
  • 113
  • 8
  • Are you sure you've actually got the x86_64 libs? They are packaged separately, and if you've got them double check your paths for the link to make sure you're pointing the linker at the 64 bit libs and not the 32 bit ones. – Spudd86 Jul 15 '14 at 20:00
  • I double checked, in the lib directory there are two separate folders, x64 and x86, if I link to the x86, it works, otherwise, with the x64 it bugs... Anyway that's not that big of a problem :) – Frotaur Jul 15 '14 at 20:07
  • 1
    Are you building your project x64 as well? just checking. Also ensure your project configuration for (x64, x86) is the same. Except for the linking part :) – cageman Jul 15 '14 at 20:08
  • Ach, that was it, I'm a moron... Thanks ! – Frotaur Jul 15 '14 at 23:13

0 Answers0