Building with libraries

This is a discussion on Building with libraries within the C++ Programming forums, part of the General Programming Boards category; It is a very basic question, but I don't know how to compile a .cpp that comes with 3rd party ...

  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
    Portugal
    Posts
    7,434
    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.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    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
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

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

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