Solved

how to include a library into a MS VS 2008

Posted on 2011-02-24
2
1,476 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

822 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