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

Author Topic: Questions about .dlls and such  (Read 3372 times)

0 Members and 1 Guest are viewing this topic.

Sigvatr

  • Newbie
  • *
  • Posts: 32
    • MSN Messenger - msn@sigvatr.com
    • AOL Instant Messenger - SigvatrAIM
    • View Profile
    • http://www.sigvatr.com
Questions about .dlls and such
« on: August 29, 2009, 09:29:46 am »
Hi guys,

I just started porting my game from HGE over to SFML today, primarily because I was interested in the cross-platform compatibility and shader support.

I was wondering a few things:

1) I'm using Windows. Does a console always pop up and have to be open during the duration of the program running? I'd really prefer that it wasn't there.

2) Is there a way to build the .dll's into the program so that they don't need to be included in the executable file's folder?

Cheers!

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Questions about .dlls and such
« Reply #1 on: August 29, 2009, 09:39:10 am »
Hi and welcome.

1) Choose the Windows application template and link to sfml-main.lib (in your preferred build configuration).

2) That's called static linkage. SFML comes with static versions of its libraries (suffix "-s") that you can use.
Why do you want to link statically?

Sigvatr

  • Newbie
  • *
  • Posts: 32
    • MSN Messenger - msn@sigvatr.com
    • AOL Instant Messenger - SigvatrAIM
    • View Profile
    • http://www.sigvatr.com
Questions about .dlls and such
« Reply #2 on: August 29, 2009, 09:41:44 am »
I just don't want a billion files clogging up my application's folder. How do I enable static linkage?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Questions about .dlls and such
« Reply #3 on: August 29, 2009, 10:29:25 am »
Did you first read the tutorials? Both questions are answered in them.
Laurent Gomila - SFML developer

Sigvatr

  • Newbie
  • *
  • Posts: 32
    • MSN Messenger - msn@sigvatr.com
    • AOL Instant Messenger - SigvatrAIM
    • View Profile
    • http://www.sigvatr.com
Questions about .dlls and such
« Reply #4 on: August 29, 2009, 01:20:24 pm »
Aha!

I think I found something wrong with the windowing tutorial.

Code: [Select]
   bool Running = true;
    while (Running)
    {
        App.Display();
    }


I might be wrong, but I think this is telling SFML to force loading of display windows. My display window does nothing, I can't even click on the close button to close it, it just sits there and you can't do anything to it unless you close it with the task manager.

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Questions about .dlls and such
« Reply #5 on: August 29, 2009, 02:40:50 pm »
you don't handle any events.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Questions about .dlls and such
« Reply #6 on: August 29, 2009, 02:59:17 pm »
Quote
I think I found something wrong with the windowing tutorial

This tutorial doesn't claim to provide a fully working window. There's nothing wrong, you just have to read the next tutorials to get something useful.
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Questions about .dlls and such
« Reply #7 on: August 30, 2009, 07:21:28 pm »
Quote from: "Sigvatr"
I just don't want a billion files clogging up my application's folder.

Then just copy all required libraries to your Windows system directory.