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

Posted on 2011-05-10
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
    LVL 31

    Accepted Solution

    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 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

    Do they have to be tailored for Visual Studio in order to work with VS? It appears that someone on who was having the same problem found that these files were the answer..

    Author Comment

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

    Expert Comment

    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 31

    Expert Comment

    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

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    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…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

    734 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

    21 Experts available now in Live!

    Get 1:1 Help Now