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

Author Topic: SFML2.0 - fatal error LNK1107  (Read 2746 times)

0 Members and 1 Guest are viewing this topic.

Flyde

  • Newbie
  • *
  • Posts: 4
    • View Profile
SFML2.0 - fatal error LNK1107
« on: December 07, 2011, 01:03:33 pm »
Hi everybody!

I'm trying to compile my project with SFML2.0 (have compiled SFML2.0 with Visual Studio 9)

Before that, I've used SFML 1.6 but I'm a victim of the ATI bug ;)

I think I've compiled it correctly (SFML 2.0) but when I'm trying to compile my project, I'm getting
Quote
sfml-graphics-d-2.dll : fatal error LNK1107: Invalid or corrupted File: Read at 0x2E0 not possible.


How I compiled SFML2.0
- CMAKE
-- Build Examples
-- Build Shared Libs
-- Type: Release
- Visual Studio 9
-- Compiled "ALL_BUILD"
-- Compiled "INSTALL"

How I've implemented it into Visual Studio 9
- Added lib, include & src path to Visual Studio 9
- Added .dll files to my Project (Linker/Input)
- Copied the .dll into my project folder

Any newbie mistakes so far? :P

p.s.: I've used some tutorial code for testing sfml 2.0

Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
    // Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
   
    // Start game loop
    while (App.IsOpened())
    {
        // Clear the screen (fill it with black color)
        App.Clear();

        // Display window contents on screen
        App.Display();
    }

    return EXIT_SUCCESS;
}

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML2.0 - fatal error LNK1107
« Reply #1 on: December 07, 2011, 01:40:23 pm »
Quote
Any newbie mistakes so far?

Yes ;)
You must link (Linker/Input) to the .lib files, not to the .dll ones.
Laurent Gomila - SFML developer

Flyde

  • Newbie
  • *
  • Posts: 4
    • View Profile
SFML2.0 - fatal error LNK1107
« Reply #2 on: December 07, 2011, 01:44:45 pm »
Oh
my
god.

This was indeed a newbie mistake ;)
Thanks for your fast reply! ATI bug (as expected) is also fixed now. :)