6
« on: February 12, 2011, 07:43:46 am »
I am trying to just run basic tutorial code with window up. i got it to work since then i got a bunch of linker errors i followed a lot guides i got the linker error to go away now i get this.
1>C:\SFML\lib\sfml-window-d.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x308
and this is my code ///////////////////////////////////////////////////////////
//AdventureRPG Quest Game V0.0.0
//By revix2k9
///////////////////////////////////////////////////////////
#include <iostream>
#include <SFML/Graphics.hpp>
#include "Title.cpp"
#pragma comment(lib, "sfml-system-d.lib")
#pragma comment(lib, "sfml-window-d.lib")
#pragma comment(lib, "sfml-graphics-d.lib")
int main ()
{
//Renderds window
sf::RenderWindow Game(sf::VideoMode(800,600,32) ,"AdventureRPGQuest");
//Setup Event handle
sf::Event Event;
// clears the screen
Game.Clear();
// dispalys the screen
Game.Display();
while (Game.IsOpened())
{
while(Game.GetEvent(Event))
{
//window closed
if (Event.Type == sf::Event::Closed)
{
Game.Close();
//escape key pressed
if (Event.Type == sf::Event::KeyPressed && (Event.Key.Code == sf::Key::Escape))
Game.Close();
}
}
}
return EXIT_SUCCESS;
}
I linked the sfml-window-d.lib file to linker input and include the .dll of the files as well. and i included graphics too.