Page 2 of 4
[SVN build 698, MFC] Info & Download
Posted: Fri Sep 05, 2008 4:19 am
by Eevon
you can't static link Dx or MSVC files (can you???)
Sure you can link staticaly any needed dlls. MSVC projects by default use dynamic linking. That's why they require lots of runtimes to run them. By using static liniking you can avoid such problems once and for all.
<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="201" data-ipsquote-contentclass="forums_Topic"><div>you can't static link Dx or MSVC files
Â
Nothing is stopping us from linking libpng and ZLIB static.
Â
Thats what I do when I do my compiles....
</div></blockquote>
I'm not talking about these two. They are quite small and bundled already with emulator. I'm talking about MSVC SP1 runtimes and other files listed in the readme. Just use static linking, please, for your project to make thing easier for all of us.
[SVN build 698, MFC] Info & Download
Posted: Fri Sep 05, 2008 6:51 am
by supergoofy
static link? do you mean integrating into the compiled exe?
Â
then static linking DirectX 9 or vs2008 runtimes is not wise. these two has to do with the OS and there might be a mesh, if you try to static link them. when new versions of DirectX 9 or vs2008 will be released, then the compiled builds will be obsolete. also the compiled builds may work only on the OS that they are compiled. lastly, the compiled exe will be a lot bigger. after all, downloading and installing DirectX 9 or vs2008 runtimes is something that you will not do everyday.
[SVN build 698, MFC] Info & Download
Posted: Fri Sep 05, 2008 7:04 am
by spacy51
Guys, i understand that these are WIP versions of the emu and all, but why don't you use static builds intstead dynamic anymore? There are tons of megabytes needed to be downloaded to use the emu now with only a micro portion of those runtimes really used in the emu. So please, upload ready to use versions which will work without extra downloads like VisualBoyAdvance589.7z did.
Â
Well, I guess you're right. DLLs and all are suposedly only to be used when having an installer, anything else is too time consuming for the end user. And on top, no one wnats to download the MSVC++2008 SP1 runtime, so I should make it static after all...
Â
But you WILL have to download the very latest DirectX, that's also good for games and stuff.
[SVN build 698, MFC] Info & Download
Posted: Fri Sep 05, 2008 7:16 am
by Squall Leonhart
Static linking means the compiled build contains the Dynamic libraries embedded in the exe. It increases the size of the final compiled build, but usually only requires the latest DX files.
[SVN build 698, MFC] Info & Download
Posted: Fri Sep 05, 2008 7:16 am
by spacy51
then static linking DirectX 9 or vs2008 runtimes is not wise. these two has to do with the OS and there might be a mesh, if you try to static link them.
Â
A static link of DirectX is simply not possible because the SDK comes only with DLL-loader libs.
What do the vc2008 runtime have to do with the OS? The only runtime needed for many of the windows DLL is msvcrt.dll, which is shipped with the OS. You can look that up with the "Dependency Walker" application. I think drivers also have to rely on this exact runtime, but I'm not sure.
Â
Â
when new versions of DirectX 9 or vs2008 will be released, then the compiled builds will be obsolete.
Â
Well, that the same for any game you own, what's the problem with that?
Â
Â
also the compiled builds may work only on the OS that they are compiled.
Â
Any proof of that? I doubt it.
Â
Â
lastly, the compiled exe will be a lot bigger.
Â
IIRC, not more than one or two megabytes.
Â
Â
after all, downloading and installing DirectX 9 or vs2008 runtimes is something that you will not do everyday.
Â
Well, that's true, but somehow the people are lazy and always complain... :angel:
[SVN build 698, MFC] Info & Download
Posted: Fri Sep 05, 2008 7:18 am
by spacy51
Static linking means the compiled build contains the Dynamic libraries embedded in the exe.
Â
It does not exactly embed the DLLs into the exe, it's rather just linking code in as if it was part of the compiled source code.
[SVN build 698, MFC] Info & Download
Posted: Fri Sep 05, 2008 8:33 am
by supergoofy
thanks for the explanation spacy51. I'll search wikipedia and also do a google search to learn more.
[SVN build 698, MFC] Info & Download
Posted: Fri Sep 05, 2008 9:04 am
by Hard Core Rikki
directx dlls are "system libraries" according to the GPLs (v2 and v3), and allowed redistribution next to GPLed executables in the same package (same zip file), btw (the exact snippets from th GPL FAQ referring to the situation privately disclosable)
[SVN build 698, MFC] Info & Download
Posted: Fri Sep 05, 2008 1:04 pm
by Eevon
Well, I guess you're right. DLLs and all are suposedly only to be used when having an installer, anything else is too time consuming for the end user. And on top, no one wnats to download the MSVC++2008 SP1 runtime, so I should make it static after all...
Â
But you WILL have to download the very latest DirectX, that's also good for games and stuff.
Sure, DirectX is not a problem for end user, because almost all latest games require fresh Direct X libraries and usualy users have them installed already.
Â
I hope to see next static build soon. [img]<fileStore.core_Emoticons>/emoticons/happy.png[/img]/emoticons/happy@2x.png 2x" width="20" height="20" />
Static linking means the compiled build contains the Dynamic libraries embedded in the exe. It increases the size of the final compiled build, but usually only requires the latest DX files.
Compiler links only used parts of code not entire DLL file. So exe's size increase will be insignificant comparing to lots of megabytes of entire MSVC SP1 download. Also nobody will complain about emulator's size increase nowadays, when in return it'll be ready to use right from the archive.
[SVN build 698, MFC] Info & Download
Posted: Sat Sep 06, 2008 1:20 am
by supergoofy
Eevon what are you talking about? Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) is about 4 MB. The same goes for Microsoft Visual C++ 2008 SP1 Redistributable Package (x64). So what's the point of static linking? Is a 4 MB file that big?