C++ libraries

This is a discussion on C++ libraries within the C++ Programming forums, part of the General Programming Boards category; Do I need to include the libraries with the program if I'm going to be giving it to a friend? ...

  1. #1
    gin
    gin is offline
    Hmm...? gin's Avatar
    Join Date
    Jun 2008
    Location
    Glasgow, Scotland
    Posts
    51

    C++ libraries

    Do I need to include the libraries with the program if I'm going to be giving it to a friend? Say for example I use wxWidgets, would I need to include it with my program to be able to run on my friends computer?

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    Yes, unless your friend already have the wxWidgets dlls installed.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    If it's dynamically linked, yes. If it's statically linked, then it's merged into your .exe

  4. #4
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Not if you statically link to wxWidgets, which is what I would recommend. If your friend already has the dlls and they are used by other applications on his computer, you risk breaking said applications if you don't deliver the same version of the dlls. Then your friend will throw a rock through your window.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GCC: Compiling with both static and shared libraries
    By eatwithaspork in forum C Programming
    Replies: 4
    Last Post: 06-23-2008, 01:48 PM
  2. Replies: 7
    Last Post: 05-13-2008, 03:47 AM
  3. MinGW thread-safe runtime libraries
    By Mario F. in forum C++ Programming
    Replies: 3
    Last Post: 08-21-2006, 08:15 AM
  4. Libraries and headers
    By darksaidin in forum C++ Programming
    Replies: 10
    Last Post: 07-23-2003, 06:24 AM
  5. QT and external libraries
    By Quacker in forum Linux Programming
    Replies: 1
    Last Post: 04-08-2003, 07:02 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21