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

Author Topic: Shared libraries management with Windows  (Read 3441 times)

0 Members and 1 Guest are viewing this topic.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Shared libraries management with Windows
« on: June 14, 2011, 09:34:41 pm »
[split from another topic]

Quote from: "Silvah"
Not true.


Not used any more since VS2010
http://msdn.microsoft.com/en-us/library/bb531344.aspx
http://msdn.microsoft.com/en-us/library/dd293574.aspx
Now names are used instead in Windows and this does not count as a good management of versions as you has to manually add the version. Linux operates in that you link against the library name and not the version so the latest one will always be used. This is done without any interference from the user/developer as Side-By-Side Assemblies require.

Also, Windows still lack a common place to have DLL's in order to not duplicate them.

So no I was pretty true in my statement.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Kian

  • Newbie
  • *
  • Posts: 44
    • View Profile
Shared libraries management with Windows
« Reply #1 on: June 14, 2011, 09:50:06 pm »
Not sure about the side-by-side stuff and the like, but I was always under the impression that System32 was meant for applications to store their dlls if they wanted to?

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Shared libraries management with Windows
« Reply #2 on: June 14, 2011, 10:13:50 pm »
No because of this reason: http://en.wikipedia.org/wiki/DLL_Hell

Also it is in the Windows folder which means "This is Windows property! Do not touch unless you know what you are doing!"
More or less :D
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Silvah

  • Guest
Shared libraries management with Windows
« Reply #3 on: June 15, 2011, 01:34:32 pm »
Quote from: "Groogy"
Not used any more since VS2010
Whatever MSVC runtime does is completely irrelevant to what Windows supports.

Quote from: "Groogy"
Now names are used instead in Windows and this does not count as a good management of versions as you has to manually add the version. Linux operates in that you link against the library name and not the version so the latest one will always be used.
Ah, now I understand, it's generic Windows bashing! Windows uses names so it's bad, Linux uses names so it's good. Logic got pwned. But seriously, could you expand on that?

Quote from: "Groogy"
Also, Windows still lack a common place to have DLL's in order to not duplicate them.
Again, [citation needed].

Anyway, if Linux is so good at managing shared objects, consider this: I've built some code using distro A with some library version X. Someone wants to run my code on distro B with version Y of that library. There were major breaking changes between X and Y. On both distros this is the most current version available. Now what?

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Shared libraries management with Windows
« Reply #4 on: June 15, 2011, 02:15:55 pm »
Quote from: "Silvah"
Whatever MSVC runtime does is completely irrelevant to what Windows supports.

Well it is supported or else some applications would break. What is interesting is the reason it is discontinued: The Side by Side Assembly folder is enormous, and the more applications that are installed the bigger it get's. A central system is supposed to minimize the size because libraries are not duplicated. Which kind of went against the purpose.
Since you want "citations" so often: http://blogs.technet.com/b/askcore/archive/2008/09/17/what-is-the-winsxs-directory-in-windows-2008-and-windows-vista-and-why-is-it-so-large.aspx

From that site:
Quote
So yes, the WinSXS folder is very large, and it will continue to grow as the OS ages.  I hope that this clears up some of the questions about why that is, and what you can do about it. Note that the Windows servicing structure and the layout of the store is subject to change.

Joseph Conway
Senior Support Escalation Engineer
Microsoft Enterprise Platforms Support


Quote from: "Silvah"
Ah, now I understand, it's generic Windows bashing! Windows uses names so it's bad, Linux uses names so it's good. Logic got pwned. But seriously, could you expand on that?

Dude seriously relax! I can promise you that this is not generic Windows Bashing, my favorite IDE is VS2010 and I do all my programming in Windows which makes me pretty aware of it's shortcomings. You have to accept, Windows is not perfect. Is it so impossible to grasp that Microsoft can do stuff wrong? They are human aren't they?

It is quite different when it comes to names between Windows and Linux. Linux complements names by symbolic linking meaning a file have several names. So for instance if we take SFML as an example we can have ALL versions of SFML installed on a single machine and any application using any version of SFML can be run without the developer or user raising a finger.

I'll give a basic example leaving out details on how it works using a case where several versions of sfml is installed on the same machine:
Code: [Select]
libsfml-xxx.a -> libsfml-xxx.a.2

libsfml-xxx.a.1 -> libsfml-xxx.a.1.6
libsfml-xxx.a.1.5
libsfml-xxx.a.1.6

libsfml-xxx.a.2 -> libsfml-xxx.a.2.0
libsfml-xxx.a.2.0


So if we link against sfml-xxx then libsfml-xxx.a.2.0 is used. So when we run the application on any machine it will look for the shared library called libsfml-xxx.so.2.0 instead of libsfml-xxx.so but still let's any other application using 1.5 or 1.6 still to be run. Which solves the first problem with DLL hell(which I want to note only Windows have and no other operating system). Next comes that there is no central place for shared libraries to be placed.

Quote from: "Silvah"
Again, [citation needed].
I can't give you one since Windows lack a common place to put them. It's quite hard to give you something that does not exist. Or you want a citation of someone saying that it does not have a common place to put it? Just google "Where to put my DLL"
If I remember correctly, the "right" way to do it in Windows is to register the DLL in the registry? Or is it add your folder to the PATH variable?
Either way it's more complicated than Linux version that is simply "Put it in this folder and you are done".

Quote from: "Silvah"
Anyway, if Linux is so good at managing shared objects, consider this: I've built some code using distro A with some library version X. Someone wants to run my code on distro B with version Y of that library. There were major breaking changes between X and Y. On both distros this is the most current version available. Now what?

Simple it starts using version X if it is installed otherwise it will just state that the some library with version X was not found. I pretty much covered that in my previous paragraphs. Seriously are you trying to take up an argument without knowing anything about the opponent?

You should just drop this already before any name-calling is starting. You don't have to prove that I am wrong if you think you are right. As long as it works for you. Then if somebody asks how to properly share DLL's on Windows you can just poke in and say "Side-By-Side Assembly" or whatever instead of hijacking the thread when someone else gives a suggestion you yourself don't like.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Silvah

  • Guest
Shared libraries management with Windows
« Reply #5 on: June 15, 2011, 05:26:02 pm »
Quote from: "Groogy"
Quote from: "Silvah"
Whatever MSVC runtime does is completely irrelevant to what Windows supports.

Well it is supported or else some applications would break. What is interesting is the reason it is discontinued: The Side by Side Assembly folder is enormous, and the more applications that are installed the bigger it get's. A central system is supposed to minimize the size because libraries are not duplicated. Which kind of went against the purpose.
Since you want "citations" so often: http://blogs.technet.com/b/askcore/archive/2008/09/17/what-is-the-winsxs-directory-in-windows-2008-and-windows-vista-and-why-is-it-so-large.aspx
Ah, okay. Maybe not "discontinued" (yet?), but I agree anyway.

Quote from: "Groogy"
Dude seriously relax!
It's quite hard to relax if one is trying to build GCC, mind you ;)

Quote from: "Groogy"
I can promise you that this is not generic Windows Bashing
But the logic behind it sounded like generic Windows bashing: both systems use names, but Windows is bad and Linux is good. Now, after you have expanded on it, it makes sense.
Quote from: "Groogy"
You have to accept, Windows is not perfect. Is it so impossible to grasp that Microsoft can do stuff wrong? They are human aren't they?
Well, Windows is really far from being perfect, as all mainstream systems are.

Quote from: "Groogy"
Which solves the first problem with DLL hell(which I want to note only Windows have and no other operating system).
Yeah, as only Windows has DLLs ;) But dependency hell is not Windows-specific at all: in fact, it affects not only operating systems, but other things too (oh hai, Hackage!).

Quote from: "Groogy"
Quote from: "Silvah"
Anyway, if Linux is so good at managing shared objects, consider this: I've built some code using distro A with some library version X. Someone wants to run my code on distro B with version Y of that library. There were major breaking changes between X and Y. On both distros this is the most current version available. Now what?

Simple it starts using version X if it is installed otherwise it will just state that the some library with version X was not found.
That's what happens in theory, yes. In practice, quick "ldd" on some random programs reveals sad truth: they're are linked with libfoo.so.K (not libfoo.so.K.L.M), so if the major version number didn't change, but there were breaking changes nevertheless (not really that uncommon), program will crash or silently misbehave.

Quote from: "Groogy"
You should just drop this already before any name-calling is starting. You don't have to prove that I am wrong if you think you are right. As long as it works for you. Then if somebody asks how to properly share DLL's on Windows you can just poke in and say "Side-By-Side Assembly" or whatever instead of hijacking the thread when someone else gives a suggestion you yourself don't like.
Yeah, I wish I weren't so short-tempered :oops:

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Shared libraries management with Windows
« Reply #6 on: June 15, 2011, 06:52:17 pm »
Quote from: "Silvah"
It's quite hard to relax if one is trying to build GCC, mind you ;)
That is true, why do you think I love VS10? Debugging is my main reason but things are pretty simple and spoiled there.

Quote from: "Silvah"
Yeah, as only Windows has DLLs ;) But dependency hell is not Windows-specific at all: in fact, it affects not only operating systems, but other things too (oh hai, Hackage!).

Yeh but Windows has the extreme cases that's why it has it's own separate name ;)
Because with DLL's it's much more than just dependency links.

Quote from: "Silvah"
That's what happens in theory, yes. In practice, quick "ldd" on some random programs reveals sad truth: they're are linked with libfoo.so.K (not libfoo.so.K.L.M), so if the major version number didn't change, but there were breaking changes nevertheless (not really that uncommon), program will crash or silently misbehave.

Hmm that's probably true yeah. Though it's an imperfect world we live in ^^
There's always something that's wrong.

Quote from: "Silvah"
Laurent, could you split the thread, please?

No need I feel that we have covered it and there is no reason to continue.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Silvah

  • Guest
Shared libraries management with Windows
« Reply #7 on: June 15, 2011, 07:15:22 pm »
Quote from: "Groogy"
That is true, why do you think I love VS10?
So do I ;), but GCC is sometimes useful nonetheless.

Quote from: "Groogy"
No need I feel that we have covered it and there is no reason to continue.
It's mainly to keep the forum clean ;)

I think I should stop before I hijack yet another thread :D

 

anything