Need help adding a C++ library to Visual Studio 2010

Posted on 2011-05-10
Medium Priority
Last Modified: 2012-05-11
I'm trying to follow the Stanford CS106B course on youtube but I'm running into problems. I've already installed VS2010 onto my computer but the course libraries installation .exe file demands that I have VS2005 installed. I've managed to find this link with what I believe are the required files:


Unfortunately, I have no idea how to even begin adding them to VS2010 so that I can use them with the CS106B programs. I'm a complete noob at this. Can anyone please help me out?  
Question by:Eindoofus
  • 3
  • 2
LVL 32

Accepted Solution

phoffric earned 2000 total points
ID: 35734638
If you go up one level, there is a README file. Here is an excerpt from it:
"The graphics library provided in this directory is a machine-independent
implementation that writes a data file called graphics.ps that can then
be sent to a PostScript printer.  If you want to draw actual figures on
the screen, you need a version of graphics.c that has been tailored for
use with your specific system
.  Several implementations of graphics.c
are included in other subdirectories (unix-xwindows, mac-think-c, and
pc-borland) of the cslib directory.

Is this what you were looking for? There is no mention of Visual Studio.

Author Comment

ID: 35734672
Do they have to be tailored for Visual Studio in order to work with VS? It appears that someone on http://stackoverflow.com/questions/1012119/stanford-engineering-everywhere-cs106b-library who was having the same problem found that these files were the answer..

Author Comment

ID: 35734756
Sorry, nevermind my last reply. Would it be possible to get these files going on a linux system?
LVL 32

Expert Comment

ID: 35734953
Here is the CS106B homepage:

You will find useful information here (including PDF files) that I don't think you get on YouTube.

I downloaded the PC project from here:

It has the CS106CPPLib.lib in it and it is dated 10/2/2009, so it may be using VS 2008.

After loading (and converting) into VS 2010 Express, I had link errors: std::Xran and std::Xlen Errors. Apparently you need an earlier version, VS9 rather than VS10. Here is an article that describes the problem.

I vaguely recall having this working a couple of years ago. But that would have been with VS 2008.

>> Would it be possible to get these files going on a linux system?
I'd have to look into this. For now, try downloading VS 2008 Express and see if that works better for you. (First uninstall VS 2010, or try to follow the instructions in the msdn link - just easier to uninstall and then download VS 2008.)
LVL 32

Expert Comment

ID: 35775991
FYI - One of my PCs still had VS 2008 C++ on it. I downloaded Lecture 7's Tower of Hanoi. The program built and ran with good graphics.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
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.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

862 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