Welcome, Guest. Please login or register.

Author Topic: Linking to static library files instead of dynamic ones  (Read 4020 times)

0 Members and 1 Guest are viewing this topic.

Daevius

  • Newbie
  • *
  • Posts: 12
    • View Profile
Linking to static library files instead of dynamic ones
« on: March 14, 2008, 06:22:59 pm »
Hi,

Can I somehow link to the static libraries instead of using .dll's?

It seems that I have to install OpenAL, or is this fixed with OpenAL soft?

Thanks,
Daevius

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 28523
    • View Profile
    • SFML's website
    • Email
Linking to static library files instead of dynamic ones
« Reply #1 on: March 15, 2008, 03:34:52 am »
Which DLLs are you talking about ? OpenAL or SFML ones ?

With the new version of SFML, you won't have to install OpenAL anymore, copying the DLL will be enough.
Laurent Gomila - SFML developer

Daevius

  • Newbie
  • *
  • Posts: 12
    • View Profile
Linking to static library files instead of dynamic ones
« Reply #2 on: March 15, 2008, 09:52:41 am »
OpenAL's DLL's and libsndfile-1.dll. I rather prefer one .exe then a whole list of DLL's with it ;).

SFML does that well with static libs too :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 28523
    • View Profile
    • SFML's website
    • Email
Linking to static library files instead of dynamic ones
« Reply #3 on: March 15, 2008, 10:57:46 am »
OpenAL and libsdnfile are under the LGPL license, which means I can't statically link them in SFML if I want to keep my zlib/png license.
Laurent Gomila - SFML developer

TTK-Bandit

  • Newbie
  • *
  • Posts: 21
    • View Profile
Linking to static library files instead of dynamic ones
« Reply #4 on: March 15, 2008, 11:11:01 am »
but we can link them statically if our code is published on the LGPL license, right ?
or is there maybe a problem with the zlib/png license then ?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 28523
    • View Profile
    • SFML's website
    • Email
Linking to static library files instead of dynamic ones
« Reply #5 on: March 15, 2008, 11:23:17 am »
Quote
but we can link them statically if our code is published on the LGPL license, right ?

I'm not sure, but I guess so.

Quote
or is there maybe a problem with the zlib/png license then ?

Absolutely not, the zlib/png license has almost no restriction.
Laurent Gomila - SFML developer

Wavesonics

  • Full Member
  • ***
  • Posts: 199
    • ICQ Messenger - 39886687
    • MSN Messenger - wavesonics@hotmail.com
    • AOL Instant Messenger - Jebradic
    • Yahoo Instant Messenger - Jebradic
    • View Profile
    • http://www.darkrockstudios.com/
Linking to static library files instead of dynamic ones
« Reply #6 on: December 03, 2008, 11:41:24 pm »
hhmmm... i have a case where I very much need a single exe file, no DLLs.

I did a little research and found the following:

Quote

The LGPL explicitly permits linking to proprietary code
(and it doesn't matter whether that linking is static or dynamic).

If you've modified the library, you must make the source for the
modified version available, but that's about it.


This is the discussion I'm reading it from.
http://mailman.uclinux.org/pipermail/uclinux-dev/2007-December/044997.html

Since SFML is a library which it's self is meant to be linked to and not an end program, it is essentially already "re-linkable" which precludes you form having to worry about section 6a as talked about in that post.

Sounds like as long as you aren't Modifying OpenAL you're in the clear.

If this turns out to be fact, could you then provide us with versions which statically link to the 2 audio DLLs?

Or I suppose I could do it on my own for this project *grown* ;)
Maybe for 1.4 *hint* *hint*

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 28523
    • View Profile
    • SFML's website
    • Email
Linking to static library files instead of dynamic ones
« Reply #7 on: December 04, 2008, 07:10:58 am »
OpenAL should be ok, but libsndfile is a little bit hard to rebuild on Windows.
Laurent Gomila - SFML developer

Wavesonics

  • Full Member
  • ***
  • Posts: 199
    • ICQ Messenger - 39886687
    • MSN Messenger - wavesonics@hotmail.com
    • AOL Instant Messenger - Jebradic
    • Yahoo Instant Messenger - Jebradic
    • View Profile
    • http://www.darkrockstudios.com/
Linking to static library files instead of dynamic ones
« Reply #8 on: December 04, 2008, 04:47:58 pm »
hhmmm well even one less DLL would be nice for static linking options, might you compile the OpenAL DLL into the static libs from now on?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 28523
    • View Profile
    • SFML's website
    • Email
Linking to static library files instead of dynamic ones
« Reply #9 on: December 04, 2008, 07:59:36 pm »
I'll do it as soon as I can.
Laurent Gomila - SFML developer

Wavesonics

  • Full Member
  • ***
  • Posts: 199
    • ICQ Messenger - 39886687
    • MSN Messenger - wavesonics@hotmail.com
    • AOL Instant Messenger - Jebradic
    • Yahoo Instant Messenger - Jebradic
    • View Profile
    • http://www.darkrockstudios.com/
Linking to static library files instead of dynamic ones
« Reply #10 on: December 04, 2008, 10:39:40 pm »
awesome, your the man Laurent!