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 - Syntactic Fructose

Pages: 1 ... 4 5 [6]
76
General / Displaying Integers?
« on: March 15, 2012, 08:09:41 pm »
I've wanted to get out of the console in C++ for awhile now, and im trying to learn SFML. The problem is that the tutorials on this site are extremely limited and teach very litte. If i wanted to say, convert a normal console application that asks users to enter 2 numbers on the screen and displays the sum, how would i go about doing that? Also, if someone to link me an actual tutorial series for SFML i would be very grateful!

77
General discussions / What project do i create?
« on: March 07, 2012, 03:30:23 am »
Thanks for the help, its almost completely working now, only one last problem currently. I get this error:
Code: [Select]
ld.exe||cannot find -lsfml-audio.dll|
||=== Build finished: 1 errors, 0 warnings ===|

when running this code:
Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
    // Create the main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");

    // Load a sprite to display
    sf::Image Image;
    if (!Image.LoadFromFile("cb.bmp"))
        return EXIT_FAILURE;
    sf::Sprite Sprite(Image);

// Start the game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        // Clear screen
        App.Clear();

        // Draw the sprite
        App.Draw(Sprite);

        // Update the window
        App.Display();
    }

    return EXIT_SUCCESS;
}


I think it has to do with something the tutorial said in these two quotes:
Quote
Your program should now compile, link and run fine. If you linked against the dynamic versions of the SFML libraries, donc forget to copy the corresponding DLLs (sfml-system.dll in this case) to your executable's directory, or to a directory contained in the PATH environment variable.

and
Quote
If you are using the Audio package, you must also copy the DLLs of the external libraries needed by it, which are libsndfile-1.dll, and OpenAL32.dll.
These files can be found in the extlibs\bin directory of the package that you downloaded (SDK or development files).

Help is appreciated, thank you. ALSO: this code was created through the codeblocks SFML wizard.

78
General discussions / What project do i create?
« on: March 07, 2012, 01:42:12 am »
Im lost, if i want to create a simple window in SFML, do i use a console project? or a SFML project? or what?! I use code blocks currently and have had a hellish day trying to install SFML to work properly, im constantly getting errors with the SFML project wizard in code blocks and the only answer ive been able to get was to stop using the wizard... So what project do i use? Will console work? Heres the extremely simple code i cant get to work(using a console project atm).
Code: [Select]
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>

int main(int argc, char** argv)
{
    bool running = true;
   sf::Window App(sf::VideoMode(1200, 600, 32), "SFML WINDOW");
   while(running)
   {
       App.Display();
   }
   return EXIT_SUCCESS;
}

79
Audio / Cannot find -lsfml-audio.dll
« on: March 07, 2012, 01:30:52 am »
so under build options how should i set up the list?
currently i use:
build options->release->linker settings->other linker options
Code: [Select]
-lsfml-audio-s
-lsfml-graphics
-lsfml-window
-lsfml-system

80
Audio / Cannot find -lsfml-audio.dll
« on: March 06, 2012, 08:30:47 pm »
Cant seem to get SFML to work, im using Codeblocks compiler for C++.
I created a new SFML project using the wizard and was provided the following code(simple window).
Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
    // Create the main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");

    // Load a sprite to display
    sf::Image Image;
    if (!Image.LoadFromFile("cb.bmp"))
        return EXIT_FAILURE;
    sf::Sprite Sprite(Image);

// Start the game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        // Clear screen
        App.Clear();

        // Draw the sprite
        App.Draw(Sprite);

        // Update the window
        App.Display();
    }

    return EXIT_SUCCESS;
}
but upon running i get the error:
Code: [Select]
||=== Tester, Debug ===|
ld.exe||cannot find -lsfml-audio.dll|
||=== Build finished: 1 errors, 0 warnings ===|

Im not sure why though, because i clearly see the audio.dll file in the folder, and have the correct links. Any suggestions?

Pages: 1 ... 4 5 [6]
anything