Jump to content
  • Advertisement
Sign in to follow this  
widmowyfox

Binary, Source Release, Libs And Dll

This topic is 787 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was started work with physx and something caught my attention. What is the difference between binary and source SDK? Which is better? I saw that source doesn't have libs and dlls so how application can work outside the development environment? For example in directx I always keep application with dlls but source release hasn't dlls. It is basic knowledge that I do not have, and I really want to :P

Share this post


Link to post
Share on other sites
Advertisement

'Binary' means it is the compiled code - in this case, the libs and dlls.

'Source' means it is the source code, uncompiled. i.e. the .cpp and .h files.

 

The source code compiled for one operating system won't run on other operating systems. Even on the same operating system, if you are using a different compiler than me, your compiled binaries won't work with my compiled binaries. i.e. if you compile a lib and DLL using Visual Studio, I can't (easily) compile my .exe to work with your DLL if I'm using MinGW/GCC. They won't work well together if they are built with different compilers... or even different versions of the same compiler, if enough things changed between versions.

 

So, libraries are often distributed as source code, so each developer can compile their own version that works for their compiler, compiler version, compiler settings, OS, OS version, and OS settings (x64 vs x86 versions of Windows, for example).

 

The binary options are just a convenience, by providing a pre-compiled version for one or two of the most popular compilers. Even when binary options are provided, I don't use them - they just waste my time since they never work with my particular setup anyway. But if you are using a wildly used compiler like Visual Studio's, pre-built libraries are a huge help that saves a lot of hair-pulling!

 

Another example is, sometimes I want a library to be a dynamic library (a DLL), and other times I want the library to be a statically-linked library that gets embedded into the .exe; if a website ONLY provides pre-built libraries, they might not give me the version I want, but if they provide source code, I can compile the library how I want, with the settings I want, so it plays nice with my .exe.

 

Neither Binary nor Source is 'better'. Source is more flexible, but Binary is more convenient. Both options provide the exact same library, though - the code doesn't behave any different when ran.

 

If you haven't compiled any libraries from source before, it can often be a pain (unless you use Visual Studio and they are pre-setup for exactly the version of Visual Studio you are using), hence the convenient pre-built option.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!