Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: hey guys, i got a problem..  (Read 5580 times)

0 Members and 2 Guests are viewing this topic.

it's me, mario

  • Newbie
  • *
  • Posts: 4
    • View Profile
hey guys, i got a problem..
« on: June 17, 2011, 11:30:25 am »
1st of all :
I am using the Microsoft Visual C++ 2010 Express-Editor and wanted to test the " http://www.sfml-dev.org/documentation/1.6/ " example..
i've installed the sfml 1.6 with this tutorial.. ( http://www.sfml-dev.org/tutorials/1.6/start-vc.php )
i hope someone can help me :p..

well here are the error codes.. :
""
Code: [Select]

1>main.obj : error LNK2019: unresolved external symbol ""public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: virtual void __thiscall sf::RenderTarget::Draw(class sf::Drawable const &)" (?Draw@RenderTarget@sf@@UAEXABVDrawable@2@@Z)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: void __thiscall sf::RenderTarget::Clear(class sf::Color const &)" (?Clear@RenderTarget@sf@@QAEXABVColor@2@@Z)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: void __thiscall sf::Window::Close(void)" (?Close@Window@sf@@QAEXXZ)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: bool __thiscall sf::Window::GetEvent(class sf::Event &)" (?GetEvent@Window@sf@@QAE_NAAVEvent@2@@Z)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: bool __thiscall sf::Window::IsOpened(void)const " (?IsOpened@Window@sf@@QBE_NXZ)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: void __thiscall sf::SoundStream::Play(void)" (?Play@SoundStream@sf@@QAEXXZ)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: virtual __thiscall sf::Music::~Music(void)" (??1Music@sf@@UAE@XZ)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: bool __thiscall sf::Music::OpenFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?OpenFromFile@Music@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: __thiscall sf::Music::Music(unsigned int)" (??0Music@sf@@QAE@I@Z)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: __thiscall sf::String::String(class sf::Unicode::Text const &,class sf::Font const &,float)" (??0String@sf@@QAE@ABVText@Unicode@1@ABVFont@1@M@Z)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: __thiscall sf::Unicode::Text::Text(char const *)" (??0Text@Unicode@sf@@QAE@PBD@Z)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: bool __thiscall sf::Font::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,class sf::Unicode::Text const &)" (?LoadFromFile@Font@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IABVText@Unicode@2@@Z)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: __thiscall sf::Unicode::Text::Text(unsigned int const *)" (??0Text@Unicode@sf@@QAE@PBI@Z)" in Funktion "_main".
1>main.obj : error LNK2001 unresolved external symbol ""public: static unsigned int * sf::Font::ourDefaultCharset" (?ourDefaultCharset@Font@sf@@0PAIA)".
1>main.obj : error LNK2019: unresolved external symbol ""public: __thiscall sf::Font::Font(void)" (??0Font@sf@@QAE@XZ)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: __thiscall sf::Sprite::Sprite(class sf::Image const &,class sf::Vector2<float> const &,class sf::Vector2<float> const &,float,class sf::Color const &)" (??0Sprite@sf@@QAE@ABVImage@1@ABV?$Vector2@M@1@1MABVColor@1@@Z)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UAE@XZ)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: __thiscall sf::Image::~Image(void)" (??1Image@sf@@QAE@XZ)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: bool __thiscall sf::Image::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?LoadFromFile@Image@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: __thiscall sf::Image::Image(void)" (??0Image@sf@@QAE@XZ)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (??0RenderWindow@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z)" in Funktion "_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)" in Funktion "_main".
1>main.obj : error LNK2019: unresolved external symbol ""public: virtual __thiscall sf::Drawable::~Drawable(void)" (??1Drawable@sf@@UAE@XZ)" in Funktion ""public: virtual __thiscall sf::Sprite::~Sprite(void)" (??1Sprite@sf@@UAE@XZ)".
""
[/code]

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
hey guys, i got a problem..
« Reply #1 on: June 17, 2011, 11:38:50 am »
- recompile SFML
- link to the libraries that you use (sfml-graphics, sfml-audio, sfml-window)
Laurent Gomila - SFML developer

it's me, mario

  • Newbie
  • *
  • Posts: 4
    • View Profile
hey guys, i got a problem..
« Reply #2 on: June 17, 2011, 12:35:52 pm »
sry i am a retard, these are my links.., maybe there's something wrong? ^^..

in the C:\projekte\Kopie von SFML\SFML-1.6\build\vc2008 are these :
-- sfml-audio.vcproj
-- sfml-graphics.vcproj
-- sfml-main.vcproj
-- sfml-network.vcproj
...
------
sry that this is in german, I hope you can understand the important things :p..
------

Lokk

  • Full Member
  • ***
  • Posts: 228
    • View Profile
    • http://betadineproject.wordpress.com/
hey guys, i got a problem..
« Reply #3 on: June 17, 2011, 12:41:48 pm »
Sounds good, but you have to LINK the libraries too.
With Visual Studio, use this in your code :
Code: [Select]
#pragma comment(lib, "sfml-system.lib")
...

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
hey guys, i got a problem..
« Reply #4 on: June 17, 2011, 12:54:30 pm »
I would rather specify the linked libraries in the project properties (for both release and debug).
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

it's me, mario

  • Newbie
  • *
  • Posts: 4
    • View Profile
hey guys, i got a problem..
« Reply #5 on: June 17, 2011, 12:59:28 pm »
thank you :) !

now i wrote
Code: [Select]

#pragma comment(lib, "sfml-system.lib")
#pragma comment(lib, "sfml-graphics.lib")
#pragma comment(lib, "sfml-audio.lib")
#pragma comment(lib, "sfml-window.lib")

in the first lines of the project but there's now another problem..

I can debugging it, but after that there comes an error-message called "openal32.dll" coudn't find...
i have copied all .dll's from the "sfml-1.6/lib "-dir. to my project but the " openal32.dll" is not there ..?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
hey guys, i got a problem..
« Reply #6 on: June 17, 2011, 01:04:25 pm »
As stated, I would use the project properties to link libraries. For example, your four lines do not take debug mode (with -d suffix) into account.

And the .dll files are located inside the bin directory, not lib.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

it's me, mario

  • Newbie
  • *
  • Posts: 4
    • View Profile
hey guys, i got a problem..
« Reply #7 on: June 17, 2011, 01:14:03 pm »
thank you, but i have copied the .dll files to the lib dir. ...^^, and copied everything to my project :D..., sry^^ but it still dont work..,

well i tried to release the project instead of debugging it.., but the compiler is attacking me with an error-message, called :
Code: [Select]

1>main.obj : error LNK2001: Nicht lnk2001 unresolved external symbol ""private: static unsigned int * sf::Font::ourDefaultCharset" (?ourDefaultCharset@Font@sf@@0PAIA)".
1>C:\projekte\Kopie von SFML\Release\SFML_Game.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
hey guys, i got a problem..
« Reply #8 on: June 17, 2011, 01:23:59 pm »
All your problems can be solved by simply reading the tutorial. Read it again, carefully please ;)
Laurent Gomila - SFML developer

 

anything