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 - svante112

Pages: [1]
1
Audio / Re: When trying to load in music i get an error
« on: August 27, 2013, 05:23:08 pm »
bump

2
Audio / Re: When trying to load in music i get an error
« on: August 25, 2013, 09:24:53 pm »
http://en.sfml-dev.org/forums/index.php?topic=9570.msg65322#msg65322
Maybe.

Didnt really help me but i may be following the instructions wrong ^^

3
Audio / Re: When trying to load in music i get an error
« on: August 25, 2013, 09:23:45 pm »
Tried the code and it's works( instead of *.ogg I had *.ogv). You are sure the problem is from the music/audio?

I am sure its the audio becuse if i delete the code it works :/

4
Audio / When trying to load in music i get an error
« on: August 25, 2013, 08:20:25 pm »
As the title says i get an error when i try to run this

#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
#include <SFML/Audio.hpp>

int main()
{
        float spritePosX = 50;
        float spritePosY = 50;

        sf::Music music;
       
        if(!music.openFromFile("music.ogg"))
        {
                return -1;
        }
        music.play();

    sf::RenderWindow window(sf::VideoMode(640, 480), "SFML test");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

        //Fixing texture
        sf::Texture texture;
        if(!texture.loadFromFile("wood.png"))
        {
                return EXIT_FAILURE;
        }
        texture.setSmooth(true);
        texture.setRepeated(false);

        //Fixing sprite
        sf::Sprite sprite;
        sprite.setTexture(texture);
        sprite.setColor(sf::Color::Green);
        sprite.setPosition(sf::Vector2f(spritePosX, spritePosY));

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {

                               
                       

            if (event.type == sf::Event::Closed)
                window.close();

                        if(event.type == sf::Event::KeyPressed)
                        {
                                if(event.key.code == sf::Keyboard::Up)
                                {
                                        sprite.move(0, -5);
                                }
                                if(event.key.code == sf::Keyboard::Down)
                                {
                                        sprite.move(0, 5);
                                }
                                if(event.key.code == sf::Keyboard::Left)
                                {
                                        sprite.move(-5, 0);
                                }
                                if(event.key.code == sf::Keyboard::Right)
                                {
                                        sprite.move(5, 0);
                                }
                                if(event.key.code == sf::Keyboard::R)
                                {
                                        sprite.setColor(sf::Color::Red);
                                }
                                if(event.key.code == sf::Keyboard::G)
                                {
                                        sprite.setColor(sf::Color::Green);
                                }
                                if(event.key.code == sf::Keyboard::B)
                                {
                                        sprite.setColor(sf::Color::Blue);
                                }
                                if(event.key.code == sf::Keyboard::Y)
                                {
                                        sprite.setColor(sf::Color::Yellow);
                                }
                        }

       
                }

                window.clear();
                window.draw(sprite);
        window.display();
    }

    return 0;
}
When i try to run it it says it cant start the program and then (0xc000007b)

When i check output from debug it says

Quote
The program '[8204] SFML 2.1 game.exe' has exited with code -1073741701 (0xc000007b).

I have no clue whats going on  :-[

5
General / Re: Errors while setting up SFML 2.1
« on: August 19, 2013, 09:26:55 pm »
Quote
I read this
http://www.sfml-dev.org/tutorials/2.1/start-vc.php
 and i cant find that :p
Fortunately your computer is smarter than you :P
--> Ctrl + F, "sfml-main"
Thanks! :D

6
General / Re: Errors while setting up SFML 2.1
« on: August 19, 2013, 09:26:17 pm »
Link to sfml-main. And seriously, RTFM >:(
Can you link a page where i can read all that?

7
General / Re: Errors while setting up SFML 2.1
« on: August 19, 2013, 09:18:48 pm »
Link to sfml-main. And seriously, RTFM >:(

I read this
http://www.sfml-dev.org/tutorials/2.1/start-vc.php
 and i cant find that :p

8
General / Re: Errors while setting up SFML 2.1
« on: August 19, 2013, 09:03:06 pm »
You're using a 64-bits SFML with a 32-bits compiler.

Thanks im so stupid ^^

I downloaded the 32 bit and now its says
Error   2       error LNK1120: 1 unresolved externals   c:\users\admin\documents\visual studio 2012\Projects\SFML 2.1 game\Release\SFML 2.1 game.exe    1       1       SFML 2.1 game
Error   1       error LNK2001: unresolved external symbol _WinMain@16   c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\MSVCRT.lib(crtexew.obj)        SFML 2.1 game
 
I´m really glad you are helping me :)

9
General / Re: Errors while setting up SFML 2.1
« on: August 19, 2013, 08:22:43 pm »
Yes, because you didn't read carefully ::)

SFML_STATIC must match the libraries' -s suffix.

Ops that fixed most of the error  ;D

Still got one error saying

error LNK1112: module machine type'x64' conflicts with target machine type 'X86'

11
General / Errors while setting up SFML 2.1
« on: August 19, 2013, 05:45:18 pm »
Hello!

Ive just tried setting up a project that are going to use SFML 2.1

I followed the tutorial on SFML website but i get alot of errors when i try to run it.

Errors looks like this
Error   18      error LNK1120: 17 unresolved externals  c:\users\admin\documents\visual studio 2012\Projects\SFML 2.1 game\Debug\SFML 2.1 game.exe      SFML 2.1 game
Error   15      error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)     c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   16      error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)    c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   14      error LNK2019: unresolved external symbol "public: __thiscall sf::CircleShape::CircleShape(float,unsigned int)" (??0CircleShape@sf@@QAE@MI@Z) referenced in function _main      c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   7       error LNK2019: unresolved external symbol "public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z) referenced in function _main c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   10      error LNK2019: unresolved external symbol "public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0RenderWindow@sf@@QAE@VVideoMode@1@ABVString@1@IABUContextSettings@1@@Z) referenced in function _main    c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   1       error LNK2019: unresolved external symbol "public: __thiscall sf::String::String(char const *,class std::locale const &)" (??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   2       error LNK2019: unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function _main       c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   4       error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::isOpen(void)const " (?isOpen@Window@sf@@QBE_NXZ) referenced in function _main    c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   5       error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main    c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   11      error LNK2019: unresolved external symbol "public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UAE@XZ) referenced in function _main  c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   12      error LNK2019: unresolved external symbol "public: virtual __thiscall sf::Shape::~Shape(void)" (??1Shape@sf@@UAE@XZ) referenced in function "public: virtual __thiscall sf::CircleShape::~CircleShape(void)" (??1CircleShape@sf@@UAE@XZ)        c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   8       error LNK2019: unresolved external symbol "public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function _main   c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   9       error LNK2019: unresolved external symbol "public: void __thiscall sf::RenderTarget::draw(class sf::Drawable const &,class sf::RenderStates const &)" (?draw@RenderTarget@sf@@QAEXABVDrawable@2@ABVRenderStates@2@@Z) referenced in function _main      c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   13      error LNK2019: unresolved external symbol "public: void __thiscall sf::Shape::setFillColor(class sf::Color const &)" (?setFillColor@Shape@sf@@QAEXABVColor@2@@Z) referenced in function _main   c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   3       error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::close(void)" (?close@Window@sf@@QAEXXZ) referenced in function _main     c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   6       error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::display(void)" (?display@Window@sf@@QAEXXZ) referenced in function _main c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\main.obj       SFML 2.1 game
Error   17      error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup c:\Users\Admin\documents\visual studio 2012\Projects\SFML 2.1 game\SFML 2.1 game\MSVCRTD.lib(crtexew.obj)       SFML 2.1 game

 

Pages: [1]
anything