Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


QMake and SFML linking under windows


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Bluefirehawk   Crossbones+   -  Reputation: 1232

Like
0Likes
Like

Posted 05 October 2012 - 06:47 AM

Hi guys

I tried to link to the SFML library with a QTCreator project under windows. And it didn't work.
QTCreator doesn't allow me to select .dll files, the wizard only accepts .lib.

So this is what i did:
  • I downloaded SFML 1.6 for MinGW and put it in the project folder under /lib.
  • I have MinGW installed and selected it as my compiler/builder in the project settings.
  • I tried building the program with both writing down the relative path to the dll, and by using -L(path to /lib) -lmylib... with the first one, it said it didn't find sfml-window.dll, with the second one, it didn't find sfml-graphics.dll when trying to run the exe.
I am guessing, i am doing something very simple very wrong. Here are the relevant files:

project file
Spoiler


main.cpp
Spoiler

Project: Project
Setting fire to these damn cows one entry at a time!

Sponsor:

#2 Faelenor   Members   -  Reputation: 396

Like
0Likes
Like

Posted 05 October 2012 - 06:57 AM

You don't link a DDL, you link the library file corresponding to the DDL. Did you read the instruction on SFML website?

http://www.sfml-dev.....6/start-vc.php

Edit: well, the link I provided is for VS, but the idea is the same...

Edited by Faelenor, 05 October 2012 - 06:58 AM.


#3 Bluefirehawk   Crossbones+   -  Reputation: 1232

Like
0Likes
Like

Posted 05 October 2012 - 07:04 AM

I don't use visual studio, I use MinGW. There are no .lib files (all i've found about those suggested they are proprietary VS libraries).

I read the instructions, I can compile and link samples via GCC, but I want to do it with QMake. I haven't found a satisfying tutorial for QMake, the only thing I've found was to put the dlls in the windows system folder, which i would like to avoid.

E:The strange thing is i can compile, the linker too finishes without an error. I am guessing the exe doesn't know where to find the dll's.

Edited by Bluefirehawk, 05 October 2012 - 07:08 AM.

Project: Project
Setting fire to these damn cows one entry at a time!

#4 Faelenor   Members   -  Reputation: 396

Like
0Likes
Like

Posted 05 October 2012 - 07:10 AM

In that case, you just have to copy the DDL in your .exe folder? Or make sure the startup directory is the one containing the DDL?




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS