Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML installing on Visual Studio 2010 Professional  (Read 21340 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #30 on: October 09, 2012, 04:23:24 pm »
Title doesn't what? Are you sure that you didn't mix debug and release (i.e. linking release libs in debug mode)?

Quote
btw. can one library be so hard as this? Only problems after problems.
Are you kidding? The only problem is that you don't want to read the tutorial.
And SFML is not more complicated than any other library, the configuration steps required here are quite common.
Laurent Gomila - SFML developer

ekeimaja

  • Guest
Re: SFML installing on Visual Studio 2010 Professional
« Reply #31 on: October 09, 2012, 04:26:00 pm »
I try again. Yes sorry, I'm just very tired and pissed.

And when I add  -d to .lib for debug mode, I get this error:


warning LNK4099: PDB 'sfml-main-d.pdb' was not found with 'sfml-main-d.lib(SFML_Main.cpp.obj)' or at 'C:\Users\ekeimaja\Desktop\sfml\Debug\sfml-main-d.pdb'; linking object as if no debug info C:\Users\ekeimaja\Desktop\sfml\sfml\sfml-main-d.lib(SFML_Main.cpp.obj)  sfml
« Last Edit: October 09, 2012, 04:28:15 pm by ekeimaja »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #32 on: October 09, 2012, 04:49:36 pm »
This is not an error, just a normal warning (you didn't compile SFML so you don't have its debugging symbols). It has no effect on your application.
Laurent Gomila - SFML developer

xzbobzx

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: SFML installing on Visual Studio 2010 Professional
« Reply #33 on: October 09, 2012, 05:27:55 pm »
I'll just post this here I guess.

Uh, I tried the 2.0 installation tutorial on 2010 express, did everything it told me to, and got this:
http://www.sfml-dev.org/tutorials/2.0/start-vc.php

When I changed
int main()
to
int WinMain()
, as to see if that would fix it, I got this:
1>k:\yannic\bobstudios\projects\sfml_test_1\sfml_test_1\main.cpp(4): warning C4007: 'WinMain' : must be '__stdcall'
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

What am I doing wrong?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #34 on: October 09, 2012, 05:44:05 pm »
Uh, I tried the 2.0 installation tutorial on 2010 express, did everything it told me to, and got this:
http://www.sfml-dev.org/tutorials/2.0/start-vc.php
Hu you got a link to the tutorial from the compiler? ???

What am I doing wrong?
Well you've answered that yourself already:

When I changed
int main()
to
int WinMain()
, as to see if that would fix it, I got this:
1>k:\yannic\bobstudios\projects\sfml_test_1\sfml_test_1\main.cpp(4): warning C4007: 'WinMain' : must be '__stdcall'
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

Don't just change the main() to WinMain() that's not how things work. ;D

If you want to get rid of the console window, then link against sfml-main.lib (or sfml-main-d.lib). ;)
IIRC that's also written in the tutorial somewhere.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

xzbobzx

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: SFML installing on Visual Studio 2010 Professional
« Reply #35 on: October 09, 2012, 06:08:47 pm »
Don't just change the main() to WinMain() that's not how things work. ;D

If you want to get rid of the console window, then link against sfml-main.lib (or sfml-main-d.lib). ;)
IIRC that's also written in the tutorial somewhere.

I do what now?
I added sfml-main-d.lib to the additional dependencies, but the console thing still shows.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #36 on: October 09, 2012, 06:14:18 pm »
Ah sorry forgot to mention that you need to change the subsystem to /WINDOW
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

xzbobzx

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: SFML installing on Visual Studio 2010 Professional
« Reply #37 on: October 09, 2012, 06:30:51 pm »
Ah sorry forgot to mention that you need to change the subsystem to /WINDOW

Sorry for not knowing a lot, but where do I do this?

Thanks! That worked great.

Found it under Linker > System

Bubs

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: SFML installing on Visual Studio 2010 Professional
« Reply #38 on: January 21, 2013, 09:45:59 am »
Here is a that I have found to be immensely helpful for setting up SFML 2.0 in VS2010. It should walk you through the entire process.

I got to the part where i was supposed to run nmake in the command prompt and it just comes up with 'fatal error U1064: MAKEFILE not found and no target specified'

There is definitely a makefile in the SMFL2 folder and when I added in the folder location it comes up with 'access denied'... Please help!!