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 - SFML rulez

Pages: [1]
1
Audio / Can't play music
« on: April 10, 2009, 05:06:01 pm »
Quote from: "Laurent"
Are you still mixing debug and release configurations?


No, i don´t still mix it.

Quote from: "Laurent"
One more question: are you using the static or the dynamic SFML libraries?


I use the Static library.

2
Audio / Can't play music
« on: April 10, 2009, 04:36:25 pm »
If I try to play an ogg file, this error is displayed:

Code: [Select]
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


Here´s the source code:

Code: [Select]
#include <iostream>
#include <SFML/Audio.hpp>

int main()

{

    std::string FileName;
    sf::Music MusicPlayer;

    std::cout << "Insert Path to file: ";
    std::cin >> FileName;

    if (!MusicPlayer.OpenFromFile(FileName.c_str()))
    {
        return -1;
    }

    else

    {
        MusicPlayer.Play();
    }

}

3
Window / Problem with compiling the example code
« on: April 10, 2009, 04:03:08 pm »
Thank you, it works!  :)

4
Window / Problem with compiling the example code
« on: April 10, 2009, 03:08:47 pm »
If I want to compile the Example Code:

Code: [Select]
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

    // Start main loop
    bool Running = true;
    while (Running)
    {
        App.Display();
    }

    return EXIT_SUCCESS;
}


the compiler displays this error messages:

Code: [Select]
undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'|
undefined reference to `sf::Window::Window(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&)'|
undefined reference to `sf::Window::Display()'|
undefined reference to `sf::Window::~Window()'|
undefined reference to `sf::Window::~Window()'|
||=== Build finished: 5 errors, 0 warnings ===|


In Codeblocks under 'Other Linker Options' i have inserted:

Code: [Select]
-lsfml-network
-lsfml-network-d


Under Link Libraries i have inserted:

Code: [Select]
C:\Programme\CodeBlocks\MinGW\lib\libws2_32.a

and under search directories I have inserted:

Code: [Select]
C:\Programme\CodeBlocks\SFML\SFML-1.4\include

Sorry if my english isn´t very good.

Pages: [1]