Panel użytkownika
Nazwa użytkownika:
Hasło:
Nie masz jeszcze konta?

[SFML] Pliki .inl odmawiają współpracy

Ostatnio zmodyfikowano 2012-04-26 15:03
Autor Wiadomość
Schulze13
Temat założony przez niniejszego użytkownika
[SFML] Pliki .inl odmawiają współpracy
» 2012-04-26 14:30:54
Witam,
Już na samym początku pracy z SFML pojawiły się problemy w postaci braku plików .inl. Po ich doinstalowaniu CodeBlock wypluwa mi następujący alert
obj\Debug\main.o||In function `main':|
C:\Users\Schulze13\Documents\C++\SFMLTest\main.cpp|5|undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'|
C:\Users\Schulze13\Documents\C++\SFMLTest\main.cpp|5|undefined reference to `sf::Window::Window(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&)'|
C:\Users\Schulze13\Documents\C++\SFMLTest\main.cpp|8|undefined reference to `sf::Window::Display()'|
C:\Users\Schulze13\Documents\C++\SFMLTest\main.cpp|6|undefined reference to `sf::Window::IsOpened() const'|
C:\Users\Schulze13\Documents\C++\SFMLTest\main.cpp|5|undefined reference to `sf::Window::~Window()'|
C:\Users\Schulze13\Documents\C++\SFMLTest\main.cpp|5|undefined reference to `sf::Window::~Window()'|
C:\Users\Schulze13\Documents\C++\SFMLTest\main.cpp|5|undefined reference to `sf::Window::~Window()'|
||=== Build finished: 7 errors, 0 warnings ===|

Jak mogę pozbyć się tego problemu? Liczę na waszą pomoc.

@edit
treść błędu się zmieniła
P-55390
hincu
» 2012-04-26 14:40:42
pokaz kod w g*wnie nie bedziemy grzebali
P-55392
Schulze13
Temat założony przez niniejszego użytkownika
» 2012-04-26 14:45:56
main.cpp
C/C++
#include <SFML/Window.hpp>

int main()
{
    sf::Window oknoAplikacji( sf::VideoMode( 800, 600, 32 ), "Kurs SFML - http://cpp0x.pl" );
    while( oknoAplikacji.IsOpened() )
    {
        oknoAplikacji.Display();
    }
    return 0;
}

vector3.inl
C/C++
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
//    you must not claim that you wrote the original software.
//    If you use this software in a product, an acknowledgment
//    in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
//    and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//


template < typename T >
Vector3 < T >::Vector3()
    : x( 0 )
    , y( 0 )
    , z( 0 )
{
   
}


template < typename T >
Vector3 < T >::Vector3( T X, T Y, T Z )
    : x( X )
    , y( Y )
    , z( Z )
{
   
}


template < typename T >
Vector3 < T > operator -( const Vector3 < T >& V )
{
    return Vector3 < T >( - V.x, - V.y, - V.z );
}


template < typename T >
Vector3 < T >& operator +=( Vector3 < T >& V1, const Vector3 < T >& V2 )
{
    V1.x += V2.x;
    V1.y += V2.y;
    V1.z += V2.z;
   
    return V1;
}


template < typename T >
Vector3 < T >& operator -=( Vector3 < T >& V1, const Vector3 < T >& V2 )
{
    V1.x -= V2.x;
    V1.y -= V2.y;
    V1.z -= V2.z;
   
    return V1;
}


template < typename T >
Vector3 < T > operator +( const Vector3 < T >& V1, const Vector3 < T >& V2 )
{
    return Vector3 < T >( V1.x + V2.x, V1.y + V2.y, V1.z + V2.z );
}


template < typename T >
Vector3 < T > operator -( const Vector3 < T >& V1, const Vector3 < T >& V2 )
{
    return Vector3 < T >( V1.x - V2.x, V1.y - V2.y, V1.z - V2.z );
}


template < typename T >
Vector3 < T > operator *( const Vector3 < T >& V, T X )
{
    return Vector3 < T >( V.x * X, V.y * X, V.z * X );
}


template < typename T >
Vector3 < T > operator *( T X, const Vector3 < T >& V )
{
    return Vector3 < T >( V.x * X, V.y * X, V.z * X );
}


template < typename T >
Vector3 < T >& operator *=( Vector3 < T >& V, T X )
{
    V.x *= X;
    V.y *= X;
    V.z *= X;
   
    return V;
}


template < typename T >
Vector3 < T > operator /( const Vector3 < T >& V, T X )
{
    return Vector3 < T >( V.x / X, V.y / X, V.z / X );
}


template < typename T >
Vector3 < T >& operator /=( Vector3 < T >& V, T X )
{
    V.x /= X;
    V.y /= X;
    V.z /= X;
   
    return V;
}


template < typename T >
bool operator ==( const Vector3 < T >& V1, const Vector3 < T >& V2 )
{
    return( V1.x == V2.x ) &&( V1.y == V2.y ) &&( V1.z == V2.z );
}


template < typename T >
bool operator !=( const Vector3 < T >& V1, const Vector3 < T >& V2 )
{
    return( V1.x != V2.x ) ||( V1.y != V2.y ) ||( V1.z != V2.z );
}
P-55394
hincu
» 2012-04-26 15:03:46
gdybys znal angielski wiedzialbys ze to sa errory dotyczace kodu.. zamien sf::Window na sf::RenderWindow
P-55396
« 1 »
  Strona 1 z 1