Here is a pretty complete tutorial for Linux. For Mac, it is a Unix-like system like Linux, and so, the tutorial is equally valid for Mac.
(I think it's different in you can't create/import .dll's instead it's .lib).
You have wrong, here is how it is:
Windows:
.dll : for "Dynamic-Link Library", the DLL is needed to run the executable (i.e., the library code is in the DLL only, not imported into the executable, and that code is loaded dynamically (when loading the executable)).
.lib : for static library (only used by Microsoft and Borland compilers), the lib is only needed when compiling the executable (i.e., the library code is imported into the final executable, making it a standalone executable).
Unix-like systems (Unix, QNX, Linux, Mac, Windows/Cygwin, and just about every other OS that exists today):
lib***.so : for "Shared Object", this is essentially the same as a Windows DLL (although the linking mechanisms are a bit different, but that's an advanced topic).
lib***.a : for "Archive" or also called a static library, this is the same as a .lib, but for all compilers other than Microsoft or Borland (i.e., GCC / Clang / ICC / ... under Windows also use .a for static libraries). The only difference between a .lib and a .a is the binary format used (the .a files use the ELF (POSIX) standard from Unix).
mike_2000_17
21st Century Viking
3,136 posts since Jul 2010
Reputation Points: 2,050
Solved Threads: 625
Skill Endorsements: 41
how difficult would it be to have a .lib and a .dll file so I can work with both Linux/Unix and Windows?
You'd have two builds for the two systems. Whether the actual code that gets built needs to be ported to support the different systems depends on what you're doing. That also dictates how hard it is, but it could be as simple as just rebuilding with a different target (if the code is 100% standard C++, which is portable) to anywhere as hard as rewriting the whole thing (if you use a lot of platform dependent code).
deceptikon
Challenge Accepted
3,447 posts since Jan 2012
Reputation Points: 822
Solved Threads: 473
Skill Endorsements: 57