How should open source libraries be used on Windows?

Posted by Jason Owen on Stack Overflow See other posts from Stack Overflow or by Jason Owen
Published on 2011-01-17T01:30:44Z Indexed on 2011/01/17 2:53 UTC
Read the original article Hit count: 219

There are many open-source libraries that can be compiled with Visual Studio. I'm porting a program from Linux to Windows, but it depends on a number of libraries. I don't know what the best practices regarding libraries are on Windows.

On Linux, these libraries are typically part of the distribution. To use sqlite on Debian, for example, you need only to install libsqlite3-dev and the include files and libraries (both static and dynamic) are automatically installed and available to your program.

If you need a different version than your distribution supplies, you can compile it in your home directory, install it to ~/include and ~/lib, and set the appropriate environment variables so that your compiler includes those directories in its search path.

What is the best way to use libraries that are distributed as source on Windows? If I link dynamically rather than statically, is there an easy way to copy required DLLs into the output directory to ease redistribution (assuming license requirements are met)?

© Stack Overflow or respective owner

Related posts about Windows

Related posts about visual-studio