May 22, 2014 at 8:15pm UTC
Hello!
I'm currently just trying C++ with SFML, and yeah
So I've installe SFML 2.0 for Visual C++ 2010 Express 64 bit, and I get an error while trying to run the debug of my code.
1 2 3 4 5 6 7 8 9 10
//Libraries
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::RenderWindow window(sf::VideoMode(1280, 720),"SFML Game1" );
return 0;
}
And this is the result I'm getting when trying to run it
1>------ Build started: Project: Game1, Configuration: Debug Win32 ------
1>Main.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UAE@XZ) referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::~String(void)" (__imp_??1String@sf@@QAE@XZ) referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0RenderWindow@sf@@QAE@VVideoMode@1@ABVString@1@IABUContextSettings@1@@Z) referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::String(char const *,class std::locale const &)" (__imp_??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main
1>C:\Users\Gaylord\documents\visual studio 2010\Projects\Game1\Debug\Game1.exe : fatal error LNK1120: 5 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
When changing "Enable Incremental Linking" to "Yes (/INCREMENTAL)"
I get this error
1 2 3
1
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any ideas on what I can do? :S
Last edited on May 22, 2014 at 8:16pm UTC
May 22, 2014 at 8:32pm UTC
I did link everything of that before I started this code.
I first tried with SFML 2.1, but it didn't work
then I degraded from 2.1 to 2.0, made a new project, did everything again, linking and that,
Still gets the same error..