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

Author Topic: Question on window tutorial  (Read 13274 times)

0 Members and 2 Guests are viewing this topic.

bnz

  • Newbie
  • *
  • Posts: 22
    • View Profile
Question on window tutorial
« Reply #15 on: January 23, 2010, 03:14:36 pm »
Quote
To actually select the configuration to build, you should have a combobox in the toolbar.

So when I simply change select another build mode in the dropdown menu, framed red in the following picture, it should build the correct files?

Because I tried that. I built in "Debug", "Debug DLL", "Debug static", "Release", "Release DLL" and "Release static" mode and I still didn't get the "sfml-xxx-d.lib" files. The only -d.lib file I get, is "sfml-main-d.lib".

So just to make sure I'm doing everything correctly, I'm going to list the single steps:
  • Open SFML.sln located in \SFML-1.5-sdk-windows-vc2008\SFML-1.5\build\vc2008.
  • Converting the project with the Visual Studio Conversion Wizard
  • Deleting all files in \SFML-1.5-sdk-windows-vc2008\SFML-1.5\lib\vc2008, because that's the directory where the new files will be located
  • Choosing "Debug" from the combobox (red frame in picture above) and then Build->Build solution. This results in "sfml-xxx-s-d.lib" files being created in \SFML-1.5-sdk-windows-vc2008\SFML-1.5\lib\vc2008
  • Repeating last step with other build modes
Is it correct that "sfml-xxx-s-d.lib" files are created, when I only select "Debug" as build mode? Because when I afterward select "Debug static" as build mode, it says that the 6 files were already up-to-date.

bnz

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Question on window tutorial
« Reply #16 on: January 23, 2010, 05:17:52 pm »
You should never select "Debug" or "Release" (they exist only for samples). I think that it maps to the static configurations for the SFML libraries (which answers your last question).

- Debug static produces sfml-xxx-s-d.lib files
- Debug dynamic produces sfml-xxx-d.lib (and .dll) files
- Release static produces sfml-xxx-s.lib files
- Release dynamic produces sfml-xxx.lib (and .dll) files
Laurent Gomila - SFML developer

bnz

  • Newbie
  • *
  • Posts: 22
    • View Profile
Question on window tutorial
« Reply #17 on: January 23, 2010, 05:34:40 pm »
I think I'm getting closer.  :D
Quote
Debug dynamic produces sfml-xxx-d.lib (and .dll) files

With "Debug dynamic" you mean "Debug DLL", right?
Because, if so, it produces sfml-xxx-d.dll files and sfml-xxx-d.ilk files, not sfml-xxx-d.lib files.
Is there maybe a setting, which changes the file ending from .ilk to .lib (or can I simply do so by myself :) )?

bnz

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Question on window tutorial
« Reply #18 on: January 23, 2010, 05:39:30 pm »
Quote
With "Debug dynamic" you mean "Debug DLL", right?

Yep, sorry.

Quote
Because, if so, it produces sfml-xxx-d.dll files and sfml-xxx-d.ilk files, not sfml-xxx-d.lib files.

You can ignore .ilk files, they are for debugging.
Maybe something was changed or lost during the conversion. Have you searched the .lib files in other directories?
You can also check one option in any SFML project: "Linker" -> "Advanced" -> "Import library" -> this should be the path and name of the produced .lib file.
Laurent Gomila - SFML developer

bnz

  • Newbie
  • *
  • Posts: 22
    • View Profile
Question on window tutorial
« Reply #19 on: January 23, 2010, 06:32:45 pm »
Then I guess something went wrong during conversion, because  "Linker" -> "Advanced" -> "Import library" is empty.
The follwing picture shows the situation:


I don't know if this is of any help, but here is the Build-Log of the build with "Debug DLL" setting: BuildLog.txt

bnz

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Question on window tutorial
« Reply #20 on: January 23, 2010, 06:37:30 pm »
Quote
Then I guess something went wrong during conversion, because "Linker" -> "Advanced" -> "Import library" is empty.

Weird. Anyway, try to put "$(TargetDir)$(TargetName).lib" there.
Laurent Gomila - SFML developer

bnz

  • Newbie
  • *
  • Posts: 22
    • View Profile
Question on window tutorial
« Reply #21 on: January 23, 2010, 06:51:00 pm »


I changed the properties of every sfml project to the above, but it still doesn't produce the sfml-xxx-d.lib files.

bnz

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Question on window tutorial
« Reply #22 on: January 23, 2010, 11:49:22 pm »
What does the build log say?
Laurent Gomila - SFML developer

bnz

  • Newbie
  • *
  • Posts: 22
    • View Profile
Question on window tutorial
« Reply #23 on: January 24, 2010, 12:01:35 am »
I uploaded the new build log here.

For my taste there are too many fatal errors and warnings, but I don't know in how far this is "normal".

bnz

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Question on window tutorial
« Reply #24 on: January 24, 2010, 12:44:36 am »
There are two interesting things:

Quote
Creating library C:\Users\bnz\Downloads\SFML-1.5-sdk-windows-vc2008\SFML-1.5\Temp\vc2008\sfml-network\Debug DLL\sfml-network.lib

--> this is where the .lib files are created

Quote
warning MSB8012: TargetName(sfml-network) does not match the Linker's OutputFile property value (sfml-network-d). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).

--> that seems to be the problem

I don't know what happens here, but it seems to be related to some new stuff in VS 2010.
Laurent Gomila - SFML developer

bnz

  • Newbie
  • *
  • Posts: 22
    • View Profile
Question on window tutorial
« Reply #25 on: January 24, 2010, 01:14:02 am »
So what would you suggest to do?
Is there another way to compile the library?

bnz

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Question on window tutorial
« Reply #26 on: January 24, 2010, 05:37:52 pm »
I'm not familiar at all with VS 2010 and MSBuild, so I'm affraid I can't help you further, sorry.

But you should find the lib files in "C:\Users\bnz\Downloads\SFML-1.5-sdk-windows-vc2008\SFML-1.5\Temp\vc2008\sfml-network\Debug DLL", don't you?
Laurent Gomila - SFML developer

bnz

  • Newbie
  • *
  • Posts: 22
    • View Profile
Question on window tutorial
« Reply #27 on: January 24, 2010, 06:16:37 pm »
Quote
But you should find the lib files in "C:\Users\bnz\Downloads\SFML-1.5-sdk-windows-vc2008\SFML-1.5\Temp\vc2008\sfml-network\Debug DLL", don't you?

Yes, I do.
For now, I simply renamed them to "sfml-xxx-d.lib", and it seems to work fine, finally. =)

Thanks for all your patience, help and of course for this great library! I just continued with the tutorial and I am stunned how easy things are!

I guess, when Visual Studio 2010 goes out of beta, you will provide precompiled files, as for VS 2008?

bnz

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Question on window tutorial
« Reply #28 on: January 24, 2010, 06:33:38 pm »
Quote
For now, I simply renamed them to "sfml-xxx-d.lib", and it seems to work fine, finally. =)

Renamed to what? They seem to have the right name, from the build log.

Quote
I guess, when Visual Studio 2010 goes out of beta, you will provide precompiled files, as for VS 2008?

Probably :)
Laurent Gomila - SFML developer

bnz

  • Newbie
  • *
  • Posts: 22
    • View Profile
Question on window tutorial
« Reply #29 on: January 24, 2010, 06:46:31 pm »
Quote
Renamed to what? They seem to have the right name, from the build log.

The only .lib files I could find in the directory you mentioned were called "sfml-xxx.lib". The suffix "-d" was missing, so I went ahead and added it. =)

bnz