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

Pages: [1]
1
Window / Opening window code wont work
« on: January 20, 2011, 05:49:07 am »
Quote
Have you properly linked to SFML? Is it the dynamic or static libraries?
Also, please us the [code] tags.


Im sry, im rly noob to this, i googled those things u mentioned, and i found stuff about code::blocks, do those things happen while using visual c++ too?

2
Window / Opening window code wont work
« on: January 20, 2011, 02:01:44 am »
I have this code i took from the window package tutorial:


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;
}




But when i try to build it, it fails and says:

Quote
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall sf::Window::~Window(void)" (??1Window@sf@@UAE@XZ) referenced in function _main

1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ) referenced in function _main

1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::Window::Window(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (??0Window@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z) referenced in function _main

1>main.obj : 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

1>C:\Markus\sfml-test\Debug\sfml-test.exe : fatal error LNK1120: 4 unresolved externals


I'm still learning how to use sfml, but to understand this code i need it to work. Whats going wrong with this code, its from the tutorial, so it should work, what do u guys think its happening? :lol:

Pages: [1]