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

Author Topic: SFML 1.6 and VS2010  (Read 12620 times)

0 Members and 1 Guest are viewing this topic.

Fred_FS

  • Newbie
  • *
  • Posts: 48
    • View Profile
SFML 1.6 and VS2010
« Reply #15 on: April 11, 2011, 05:45:24 pm »
»-s.lib« is a static release library. ».lib« is a dynamic release library. »-s-d.lib is a static debug library and »-d.lib« is a dynamic debug library.

vicer1234

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
SFML 1.6 and VS2010
« Reply #16 on: April 11, 2011, 06:25:09 pm »
Quote from: "Fred_FS"
Quote from: "vicer1234"
I am getting the correct .lib files from the VS 2010...but dont know what to do next :( !!!!!!!

Well, I am afraid, you're not ;).
If you recompile the SFML libs the new files are usually created in ./lib/vc2008. So if you want to use the new libs you have to you use this new directory(even if it doesn't sound new^^).


I am getting the .lib from the same folder as you have mentioned..not from some other place   :P

vicer1234

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
SFML 1.6 and VS2010
« Reply #17 on: April 11, 2011, 06:27:12 pm »
Quote from: "Fred_FS"
»-s.lib« is a static release library. ».lib« is a dynamic release library. »-s-d.lib is a static debug library and »-d.lib« is a dynamic debug library.



I know that what all it means...but my doubt is why is it not giving out the correct .lib file when executed in that mode. Like when i compile in release mode it should give .lib file (dynamic one) why is it giving out -s.lib...that confuses me  :?:

vicer1234

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
SFML 1.6 and VS2010
« Reply #18 on: April 11, 2011, 09:51:22 pm »
I downloaded the SFML from the subversion. Then i compiled the source code to generate the .lib files...

Now i am getting  library files with names like

sfml-audio.lib
sfml-audio-2.dll
sfml-audio-d.lib
sfml-audio-d-2.dll

I dont know why the -2 extension is comming???
I can use .lib and -d.lib files for compiling and I am not getting any errors now but when i run the code I am getting errors for dll files..it says that -d.dll is not there...

Whats the reason for it???

Fred_FS

  • Newbie
  • *
  • Posts: 48
    • View Profile
SFML 1.6 and VS2010
« Reply #19 on: April 11, 2011, 10:07:17 pm »
The SVN version is SFML 2. For that reason there is a -2 as extension.

If you're getting errors that the dll files were not found, you have to copy the SFML dll files into the correct directory. For example into your project directory.

vicer1234

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
SFML 1.6 and VS2010
« Reply #20 on: April 11, 2011, 11:25:25 pm »
Quote from: "Fred_FS"
The SVN version is SFML 2. For that reason there is a -2 as extension.

If you're getting errors that the dll files were not found, you have to copy the SFML dll files into the correct directory. For example into your project directory.


:P its not the problem with directory...I know what directory and where to put the .dll files. Its related to the type of .dll file. It wants .dll and -d.dll but the library which is generated is -2.dll and -d-2.dll .

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 1.6 and VS2010
« Reply #21 on: April 11, 2011, 11:40:33 pm »
Quote
It wants .dll and -d.dll

Which means that you're still linking to SFML 1 (or outdated SFML 2) libraries.
Laurent Gomila - SFML developer

vicer1234

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
SFML 1.6 and VS2010
« Reply #22 on: April 12, 2011, 11:19:59 am »
Quote from: "Laurent"
Quote
It wants .dll and -d.dll

Which means that you're still linking to SFML 1 (or outdated SFML 2) libraries.


I downloaded the sfml latest build from the repository and then I used this

1) http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php  link

to get the VS 2010 project and it generated SFML.sln

2) Then i compiled the SFML.sln keeping the setting the same and building it in debug and release mode ( since these were only been shown)

The lib files which is generated are eg:
 sfml-audio-2.dll (release) and
sfml-audio-d-2.dll ( debug)

Is the file with  -2 and d-2 extension correct?????

Or am I doing something wrong???

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 1.6 and VS2010
« Reply #23 on: April 12, 2011, 11:56:21 am »
Quote
The lib files which is generated are eg:
sfml-audio-2.dll (release) and
sfml-audio-d-2.dll ( debug)

And there should be the corresponding .lib with them, right?

Quote
Is the file with -2 and d-2 extension correct?????

Yes.
Laurent Gomila - SFML developer

vicer1234

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
SFML 1.6 and VS2010
« Reply #24 on: April 12, 2011, 12:13:49 pm »
Quote from: "Laurent"
Quote
The lib files which is generated are eg:
sfml-audio-2.dll (release) and
sfml-audio-d-2.dll ( debug)

And there should be the corresponding .lib with them, right?

Quote
Is the file with -2 and d-2 extension correct?????

Yes.


yes there is corresponding lib files too.

But when i try to use these -2.dll and -d-2.dll in running the program then it says it cant run as there is no .dll( release)  and -d.dll( debug) even if you use the existing -2.dll (release) and -2-d.dll(debug).  Whats the problem in this case??

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 1.6 and VS2010
« Reply #25 on: April 12, 2011, 12:28:55 pm »
You don't use the .dll files directly, but rather the .lib files that link to those dlls. So you should focus on the .lib files.

Can you show us the linker settings that you use in your project, especially the options where you set the SFML libraries and their path?
Laurent Gomila - SFML developer

vicer1234

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
SFML 1.6 and VS2010
« Reply #26 on: April 12, 2011, 02:09:21 pm »
I have created  a folder name 'lib' in my project and place all the .lib files in there.

The VS project settings are as shown:

linker-> general->additional library dependencies
lib

linker -> input->additional dependencies
opengl32.lib
glu32.lib
sfml-graphics-d.lib
sfml-window-d.lib
sfml-system-d.lib

I think thats enough to take care of the linker???

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 1.6 and VS2010
« Reply #27 on: April 12, 2011, 02:33:21 pm »
How many different versions of SFML libraries do you have on your whole PC?
Laurent Gomila - SFML developer

vicer1234

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
SFML 1.6 and VS2010
« Reply #28 on: April 12, 2011, 02:40:09 pm »
Quote from: "Laurent"
How many different versions of SFML libraries do you have on your whole PC?



I have SFML 1.6 and SFML 2 version on my system, but i dont mix the version in my project. I test either with 1.6 version lbrary or with 2 version.

But i keep the include files same in my project ie i am using the same include files from the 1.6 version in my project.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 1.6 and VS2010
« Reply #29 on: April 12, 2011, 03:05:37 pm »
Quote
But i keep the include files same in my project ie i am using the same include files from the 1.6 version in my project.

You mean that you include SFML 1.6 and link to SFML 2.0 ? :shock:
If the linker doesn't fail it definitely means that you're linking to SFML 1.6, not 2.0.

I don't know what else to say. I don't know what you do but you're not linking to SFML 2.0. Maybe you should remove everything and restart from scratch with a fresh SFML 2.
Laurent Gomila - SFML developer

 

anything