2
« on: March 22, 2011, 10:02:59 pm »
I am having incredible difficulty getting the linkers set up. I normally use devc++ and decided to switch to VC, but the tutorial on this site shows how libraries are linked in 2008, whereas I'm using 2010.
I have no idea what to configure where. Please help me D:
My code
#include <iostream>
#include <iomanip>
#include <SFML/Audio.hpp>
void PlaySound()
{
sf::SoundBuffer Buffer;
if (!Buffer.LoadFromFile("blueschip.mp3"))
return;
sf::Sound Sound(Buffer);
Sound.Play();
while (Sound.GetStatus() == sf::Sound::Playing)
{
sf::Sleep(0.1f);
std::cout << "\rPlaying";
}
}
int main()
{
PlaySound();
std::cout << "Press enter to exit...";
std::cin.ignore(10000, '\n');
return 0;
}
My error message:
1>------ Build started: Project: game, Configuration: Debug Win32 ------
1>Build started 3/22/2011 4:48:18 PM.
1>InitializeBuildStatus:
1> Touching "Debug\game.unsuccessfulbuild".
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
1>c:\users\mike\documents\visual studio 2010\Projects\game\Debug\game.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.14
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========