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

Author Topic: Linking Error  (Read 4757 times)

0 Members and 1 Guest are viewing this topic.

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Linking Error
« on: August 07, 2011, 11:51:48 am »
I am trying to get SFML working in VS2008 Express but I keep getting linking errors.

I have tried the release version of the libraries, the debug, and the -s... whatever that is. I always get the same thing.

Quote
The procedure entry point ??0Image@sf@@QAE@XZ could not be located in the dynamic link library sfml-graphics.dll.


I found lots of these on the forum but all of the solutions that were in those posts haven't worked for me.

EDIT: I have SFML_DYNAMIC in the preprocessor options.
-Wander

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Linking Error
« Reply #1 on: August 07, 2011, 01:51:41 pm »
Which archive did you download?
Laurent Gomila - SFML developer

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Linking Error
« Reply #2 on: August 07, 2011, 04:41:35 pm »
The full SDK for MS Visual Studio 2008. SFML 1.6. If that's what you meant.
-Wander

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Linking Error
« Reply #3 on: August 08, 2011, 10:04:14 pm »
Hello?
-Wander

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Linking Error
« Reply #4 on: August 08, 2011, 10:07:14 pm »
Can you describe exactly what you did, how you configured your project, etc.? With as many details as possible ;)
Laurent Gomila - SFML developer

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Linking Error
« Reply #5 on: August 08, 2011, 10:27:02 pm »
Yes sir I can. :)

libRocket came with a VS solution, so I opened that up in VS2008.
Tried to compile it, but SFML wasn't installed yet. Stupid me.
I went to this site, downloaded the SDK for VS2008 and followed the tutorial exactly.
I linked the libraries and the include folder into the IDE options and then I put the DLL's in System32, so I don't have to worry about it. Then I went to the project options and did the linking to the specific libraries.
sfml-main.lib
sfml-graphics.lib
sfml-window.lib
sfml-system.lib
As I said earlier. I have tried the release versions, the -d and the -s versions.

After I got those linked I added the SFML_DYNAMIC to the preprocessor options. Then I went back and linked the libRocket libraries and includes in the IDE options and tried to compile again. I got a shit-ton of gl errors. So I searched Google for a few hours and after much struggle found the location of OpenGL32.lib and GlU32.lib and I linked them. Then I compiled again and now I am landed with this weird error.

If you need any more information please let me know. All of this pain has been stretched out over a few days and I am sick and tired of it.

EDIT: I am using the sample project that came with the libRocket library. Its a VS "Solution"... whatever that is.
-Wander

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Linking Error
« Reply #6 on: August 08, 2011, 10:34:31 pm »
Have you tried a simple project sith SFML only (no libRocket)? Have you tried the examples of the SDK?
Laurent Gomila - SFML developer

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Linking Error
« Reply #7 on: August 08, 2011, 10:44:43 pm »
I just tried the sample program you have in the tutorial. The one that runs the sf::Clock and I got the same error, but with Clock instead of Image.
-Wander

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Linking Error
« Reply #8 on: August 08, 2011, 10:57:57 pm »
Are you sure that you didn't previously install another version of SFML? It seems like you have DLLs of another version of SFML somewhere that are found by the OS instead of the right ones.
Laurent Gomila - SFML developer

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Linking Error
« Reply #9 on: August 08, 2011, 11:19:47 pm »
I have another SFML that I have set up for MinGW, but I'm pretty sure VS doesn't use MinGW. I also have the repository for SFML 2.0, but I haven't done anything with it.
-Wander

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Linking Error
« Reply #10 on: August 08, 2011, 11:31:04 pm »
Quote
I have another SFML that I have set up for MinGW, but I'm pretty sure VS doesn't use MinGW

Windows will load the first SFML DLLs that it will find, it doesn't care if it was compiled with the right compiler. So if both are globally available, it might pick the wrong DLLs. Where are the MinGW DLLs?
Laurent Gomila - SFML developer

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Linking Error
« Reply #11 on: August 08, 2011, 11:36:09 pm »
Oh excuse me. The include files are setup for MinGW:
MinGW > include > SFML

I'm pretty sure that the only DLL's I have are inside of the SFML folder and then inside of the System32.
I copied from the SFML folder to System32. (Should I have moved them instead?)

EDIT: I looked again and I do have DLLs inside of:
MinGW > lib
-Wander

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Linking Error
« Reply #12 on: August 09, 2011, 07:56:41 am »
Quote
I'm pretty sure that the only DLL's I have are inside of the SFML folder and then inside of the System32.
I copied from the SFML folder to System32. (Should I have moved them instead?)

You're talking about the VC++ DLLs right?

Anyway, download the Dependency Walker utility and open your SFML executable with it. You'll see which DLLs it depends on, and where they are located.
Laurent Gomila - SFML developer

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Linking Error
« Reply #13 on: August 09, 2011, 08:04:46 am »
Wow! That was the problem. System32 was holding DLLs I used in Code::Blocks and Netbeans. Lol. Thanks so much! I've been trying to set up and get libRocket and SFML for a few days.
-Wander

 

anything