SFML community forums
Help => General => Topic started by: pighead10 on December 20, 2011, 01:02:53 pm
-
I'm using visual studio 2010 express, and have build the 2.0 from source and am using the dynamic libraries. All dynamic and static libs are in VC/lib.
Additional library directories: sfml-system.lib, sfml-window.lib, sfml-graphics.lib (with -d for debug)
Building in debug:
I first get the error of
"general error c101008a: Failed to save the updated manifest to the file "Debug\SFMLTutorial.exe.embed.manifest". The parameter is incorrect."
Any more attempts to compile it and the error is:
This application has failed to start because the application configuration is incorrect.
Building in release:
I get linker errors:
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Window::~Window(void)" (__imp_??1Window@sf@@UAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Window::Window(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0Window@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IABUContextSettings@1@@Z)
1>main.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\Samuel\Documents\Visual Studio 2010\Projects\SFMLTutorial\Release\SFMLTutorial.exe : fatal error LNK1120: 4 unresolved externals
Code I am using
#include <SFML/Window.hpp>
#include <iostream>
int main(){
sf::Window window(sf::VideoMode(800,600,32),"SFML window");
bool running = true;
while(running){
window.Display();
}
return EXIT_SUCCESS;
}
Project was a win32 console application with the "blank project" ticked.
Hope someone can help
EDIT: I forgot to hit apply when adding the libs in release. Release works fine now, runs as normal, but debug still has the error.
-
You must recompile SFML, the VC2008 libraries cannot be used with VC2010.
-
hopefully I'll be able to, I'm a newbie at this kind of stuff :(
-
There are video tutorials on this forum, if you can find them.
-
I followed a tutorial for compiling it using cmake (version 2.0) and I still get the error message. I have copied all of the lib files into VC/lib and the include files into VC/include, and the code I'm using is this:
#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;
}
For debug, I have sfml-system-s-d.lib added into additional dependencies under linker -> input and for release, sfml-system-s.lib. On the debug configuration I get the error message described but on release I get linker errors while compiling. All of the lib files are definitely there.
-
Okay, weird - I completely reinstalled visual studio to get rid of any libs I may have not removed, pasted all the dlls into my project's working directory and all the libs into vc/lib again as well as the include file, and ran the project in release mode, which run fine. I ran it in debug mode, and it came up with a "general error" and said something about failing to save the manifest file, then when running again comes up with the same error as the title.