Solved

how to include a library into a MS VS 2008

Posted on 2011-02-24
2
1,449 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
ID: 34975748
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
ID: 34975768
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

910 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

18 Experts available now in Live!

Get 1:1 Help Now