0
\$\begingroup\$

Some tutorials, such as the one on WikiHow.com, suggest to download SDL and use it without unzipping it. The instructions there read as such:

Download the version for Visual C++. It is SDL2-devel-2.0.9-VC.zip (Visual C++ 32/64-bit).

  1. In downloading window you have the zip folder SDL2-devel-2.0.9-VC.zip, and inside the folder SDL2-2.0.9. Click it > right click > select Copy.
  2. Navigate to C:\SDL. Inside SDL, right click > select Paste. Click on name SDL2-2.0.9 and rename to SDL2. Now in folder SDL you have folder SDL2.

I'm wondering if it would be better to unzip the library instead, something that would be instructed like this instead:

Download the version for Visual C++. It is SDL2-devel-2.0.9-VC.zip (Visual C++ 32/64-bit).

  1. In downloading window you have the zip folder SDL2-devel-2.0.9-VC.zip, right-click on the zip file and select Extract everything...

  2. In the window that opened up, type C:\SDL, then click Extract.

\$\endgroup\$
2
\$\begingroup\$

It looks like Windows is playing tricks on you.

With the first set of instructions, you are actually unzipping the files. For a while now (I think it started with Windows XP, Windows users no longer need to use a third party tool to extract zipped files: Windows has the tool built in the Windows/File Explorer, and it allows to seamlessly browse the archive and extract files from it: if you double-click on this zip file, Windows opens it for you and lets you browse through it. If you Copy something from within, and Paste it somewhere else (e.g. in the C:\SDL directory), Windows will extract/decompress the content at that moment. This is what happens with the first set of instructions, making the set of proposed instructions not required.

So yes, it is necessary to unzip the library, but the way you do it does not matter, as long as the files are where you tell Visual Studio to expect them. Both these methods accomplish the same thing:

  • right clicking the archive > selecting Extract all

  • double-clicking the archive > copying its contents > pasting the contents outside the archive


On a side note, Visual Studio and its linker and compiler need access to actual files to compile, link and run projects. They are not made to open .zip archives and look for .h, .lib and .dll files within. The order of the locations where the compiler looks for things is very clear when reading the documentation, and in no case there is mention of a zip file.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.