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

Pages: [1]
1
General / Fatal error after linking
« on: February 28, 2012, 03:53:38 pm »
Thank you for answer. I solved the problem ( http://ubuntuforums.org/showthread.php?t=1728268 ).

2
General / Fatal error after linking
« on: February 28, 2012, 11:53:50 am »
I added the library to my ubuntu and I compiled this code:

Code: [Select]
#include <SFML/System.hpp>
#include <iostream>
 
int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }
 
    return 0;
}


and everything went well :) The next code I will compiling is:
Code: [Select]
#include <SFML/Window.hpp>
 
int main()
{
    sf::Window oknoAplikacji( sf::VideoMode( 400, 400, 32 ), "Wprowadzenie" );
    //sf::Window oknoAplikacji;
        //oknoAplikacji.Create( sf::VideoMode( 400, 400, 32 ), "Wprowadzenie", sf::Style::Fullscreen );
 
        while( oknoAplikacji.IsOpened() )
    {
        oknoAplikacji.Display();
    }
    return 0;
}
 


In my terminal I get:
Code: [Select]
lotnik9o@ubuntu:~/Downloads$ g++ -c 1.cpp
In file included from /usr/local/include/SFML/Window.hpp:40:0,
                 from 1.cpp:1:
/usr/local/include/SFML/Window/OpenGL.hpp:47:23: fatal error: GL/gl.h: No such file or directory
compilation terminated.


How can I solve the problem?

3
Graphics / Problem with linking graphics.hpp
« on: February 23, 2012, 02:41:37 pm »
I got it :) Thank you very much!

4
Graphics / Problem with linking graphics.hpp
« on: February 23, 2012, 02:06:23 pm »
Thank you for answer. I did so with sfml-graphics, but the problem is still the same, only with the graphics module.



I had none problems to linking when I use the system or window module.

5
Graphics / Problem with linking graphics.hpp
« on: February 23, 2012, 01:35:01 pm »
I've a problem to linking this code:
Code: [Select]
int main()
{
    // Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
   
    // Start 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 the screen (fill it with black color)
        App.Clear();

        // Display window contents on screen
        App.Display();
    }

    return EXIT_SUCCESS;
}

(http://www.sfml-dev.org/tutorials/1.6/graphics-window.php)

and I got this errors:
Code: [Select]
1>Linking...
1>create_w.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ)
1>create_w.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::GetEvent(class sf::Event &)" (__imp_?GetEvent@Window@sf@@QAE_NAAVEvent@2@@Z)
1>create_w.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::IsOpened(void)const " (__imp_?IsOpened@Window@sf@@QBE_NXZ)
1>create_w.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Close(void)" (__imp_?Close@Window@sf@@QAEXXZ)
1>create_w.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z)
1>C:\Users\Documents\Visual Studio 2008\Projects\1_create_window\Release\1_create_window.exe : fatal error LNK1120: 5 unresolved externals
1>Build log was saved at "file://c:\Users\Szymon\Documents\Visual Studio 2008\Projects\1_create_window\1_create_window\Release\BuildLog.htm"


Earlier I linking my programs with window.hpp and there were none problems. Can someone help me?

6
General / Problem with compling an example code
« on: February 20, 2012, 08:18:56 pm »
I have to make the SFML headers and library files available to Visual C++ 2008 and after bulid:

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

int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }

    return 0;
}


It gives me the following errors:

Code: [Select]
1>------ Build started: Project: sf_test, Configuration: Release Win32 ------
1>Linking...
1>testx.obj : error LNK2001: unresolved external symbol "void __cdecl sf::Sleep(float)" (?Sleep@sf@@YAXM@Z)
1>testx.obj : error LNK2001: unresolved external symbol "public: float __thiscall sf::Clock::GetElapsedTime(void)const " (?GetElapsedTime@Clock@sf@@QBEMXZ)
1>testx.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::Clock::Clock(void)" (??0Clock@sf@@QAE@XZ)
1>C:\Users\Szymon\Documents\Visual Studio 2008\Projects\sf_test\Release\sf_test.exe : fatal error LNK1120: 3 unresolved externals
1>Build log was saved at "file://c:\Users\Szymon\Documents\Visual Studio 2008\Projects\sf_test\sf_test\Release\BuildLog.htm"
1>sf_test - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Can someone help me how to solve this problem?

Pages: [1]
anything