Solved

how to include a library into a MS VS 2008

Posted on 2011-02-24
2
1,432 Views
Last Modified: 2012-05-11
Hi, I am a newbie programmer.

I have downloaded http://koolplot.codecutter.org/ library onto my desktop.

I have no idea where in my MS VS folder I have to add it to.

could you walk me step by step on how to make the following code work?

Thanks a lot
#include "koolplot.h"

int main()
{
   Plotdata x(-3.0, 3.0), y = sin(x) - 0.5*x;
   plot(x, y);
   return 0;
}

Open in new window

0
Comment
Question by:pgmerLA
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 250 total points
Comment Utility
You can add that library to your project via Visual Studio or add the line

#pragma comment(lib,"user32.lib")

to your code (which basically achieves the same). To add libs using VS, open your project's properties (ALT+F7), go to "Configuration Properties|Linker|Input" and enter the lib(s) under "Additional Dependencies". If the lib you want to use does not reside in one of the standard directories or your project's build directory (Debug or Release), you can set that dirctory under "Configuration Properties|Linker|General" as "Additional Library Directories".
0
 
LVL 32

Assisted Solution

by:phoffric
phoffric earned 250 total points
Comment Utility
You want to use koolplot in Visual Studio?
The koolplot website says "koolplot is available for the MingW (GCC port) compiler"
There may be a way, but it sounds easier if you use MingW.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now