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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ciphermind

Pages: [1]
1
Audio / Audio Path
« on: March 26, 2011, 01:03:25 am »
Hi, I'm trying to play BGM using the Music class, and it works great.  However whenever I want to play a sound it has to be in the root folder of the executable!  I've tried specifying a "/sound" path in every syntax I could think of, and I was wondering what the proper syntax would be?

Here is the relevant line:
Code: [Select]
if (!Music.OpenFromFile("\sound\blues.ogg"))

2
General / Visual Studio 2010 Can't Link!!!
« 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
Code: [Select]
#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:

Code: [Select]
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 ==========

Pages: [1]
anything