Thread: Building with libraries

  1. #1
    Registered User
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    80

    Building with libraries

    It is a very basic question, but I don't know how to compile a .cpp that comes with 3rd party libraries. I have downloaded an API which includes a sample .cc file, some header files and some libraries. The required .h file is included in the .cc sample, and the sample compiles fine. But it won't build because I don't know how to build it with the provided libraries.

    I am more interested in achieving this simple task in the IDE, but even the command prompt syntax would be helpful.

    Thanks for helping.

  2. #2
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    You link the libraries in. Look at the sample's makefile.
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  3. #3
    Registered User
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    80
    It has a jamfile instead of makefile, and I don;t want to install Jam Builder on my comp... Is there a way to do it in VC++ IDE?

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    You have to downalod and install the libraries needed if the source code doesn't come with them (which usually doesn't). If it does, there's usually instructions in the folder where the library source files reside that tell you how to install it. Some "readme" or "install" text file usually in the main folder of the sources also may indicate all the installation procedures.

    If you still get stomped... you need to give more details... perhaps what have you downloaded exactly.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Registered User
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    80
    Got it working from VC++ command prompt; couldn't do it from the IDE. thanks anyways.

  6. #6
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by Opel_Corsa
    Got it working from VC++ command prompt; couldn't do it from the IDE. thanks anyways.
    Project/Settings/Link/Object/Library modules
    add the names of the lib-files separated by spaces
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 06-08-2009, 05:33 PM
  2. building boost libraries
    By l2u in forum C++ Programming
    Replies: 3
    Last Post: 05-09-2007, 08:34 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