SFML problem :S

07/01/2013 21:40 uebertreiber#1
hi, kann mir jemand sagen warum mir wenn ich den code debuggen will die fehlermeldung: "Das System kann die angegebene Datei nicht finden." kommt ?


Mein Code:
Code:
#include <iostream>
#include <SFML\Graphics.hpp>
 
using namespace std;
using namespace sf;
 
 
int main()
{
    sf::RenderWindow Spiel(sf::VideoMode(800, 600, 32), "Spiel", sf::Style::Titlebar);
 
    return 0;
}
Das wird von VS 2012 ausgegeben:
1>------ Build started: Project: sfml, Configuration: Debug Win32 ------
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>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::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::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0RenderWindow@sf@@QAE@VVideoMode@1@ABVStr ing@1@IABUContextSettings@1@@Z) referenced in function _main
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>C:\Users\lulzsec\Desktop\sfml\Debug\sfml.exe : fatal error LNK1120: 5 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


danke :)

ps. lib und include ordner wurde in den eigenschaften verlinkt und der linker auch
07/02/2013 01:23 Dr. Coxxy#2
hol die libs noch manuell mit
Code:
#pragma comment(lib, "blabla.lib")
rein.
hast entweder noch i-welche vergessen, oder i-was falsch gemacht, z.b. die ordner nur im debug modus eingestellt und dann auf release kompiliert o.ä.
07/02/2013 20:07 Delinquenz#3
Oder die Static-Libraries genommen ohne SFML_STATIC zu definieren.
07/06/2013 15:04 Schlüsselbein#4
das sollte Ihnen helfen @!
HTML Code:
///made by Schlüsselbein 
#include <iostream>

namespace bs
{
	struct bullture 
	{
		void load_from_bullshit(const char*) {}
	};

	struct bs_type 
	{
		void set_bullture(bullture) {}
	};
}

void set_bullshit_flag(bool)
{
	
}

void draw(bs::bs_type)
{
	std::cout << "bullshit\n";
}

struct base_bullshit 
{
	void clear(){}
	void display() {}
};

class custom_bullshit : public base_bullshit
{
private:
	bs::bs_type bullshit;

public:
	custom_bullshit();
	void draw_bullshit();
};


custom_bullshit::custom_bullshit()
{
	set_bullshit_flag(true);
	bs::bullture bullture;

	bullture.load_from_bullshit("bullshit.png");
	bullshit.set_bullture(bullture);
}

void custom_bullshit::draw_bullshit()
{
	draw(bullshit);
}

int main()
{
	// Create the main bullshit
	custom_bullshit shit;

	// Start the bullshit loop
	while(true)
	{
		// Clear this shit
		shit.clear();

		// Draw the bullshit
		shit.draw_bullshit();

		// Update the bullshit
		shit.display();

	}

	return EXIT_SUCCESS;
}