Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Trouble setting up Visual Studio 2005
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
abrar1434




PostPosted: Wed Jun 08, 2011 11:25 am   Post subject: Trouble setting up Visual Studio 2005

Currently, I am following a free online course provided by Stanford University titled Programming Abstractions (CS106B) in order to further my understanding of the field. The assignments in the class are all written in C++. Completion of the course material requires that one uses solely Visual Studio 2005; this is due to the fact that the course uses special libraries in order to simplify the syntax of C++. I have managed to install Visual Studio 2005 Professional, as well as setup the required libraries. However, the compiler seems to not fully function. The handout explaining the usage of VS2005 is included here: http://see.stanford.edu/materials/icspacs106b/H05P-UsingVisualStudio.pdf


Sample Program
code:

#include <iostream>
#include "genlib.h"

int main() {

        for (int i = 0; i < 5; i++) {
                cout << i;
        }
        return 0;

}


The program displayed above compiles successfully. However, nothing changes on the screen on VS2005 (no printed i). The project is a CS106B/X C++ Assignment Wizard, and the code is included in a .cpp file inside of the project. The output from the build is as follows:

code:


1>------ Rebuild All started: Project: Assignment Two, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'Assignment Two', configuration 'Debug|Win32'
1>Compiling...
1>mycode.cpp
1>Linking...
1>CS106CPPLib.lib(genlib.obj) : warning LNK4204: 'c:\Users\abrar\Desktop\Stanford\CS106B\Assignment Two\Assignment Two\Debug\vc80.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>CS106CPPLib.lib(init.obj) : warning LNK4204: 'c:\Users\abrar\Desktop\Stanford\CS106B\Assignment Two\Assignment Two\Debug\vc80.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>CS106CPPLib.lib(pcgraphics.obj) : warning LNK4204: 'c:\Users\abrar\Desktop\Stanford\CS106B\Assignment Two\Assignment Two\Debug\vc80.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>CS106CPPLib.lib(strutils.obj) : warning LNK4204: 'c:\Users\abrar\Desktop\Stanford\CS106B\Assignment Two\Assignment Two\Debug\vc80.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Embedding manifest...
1>Build log was saved at "file://c:\Users\abrar\Desktop\Stanford\CS106B\Assignment Two\Assignment Two\Debug\BuildLog.htm"
1>Assignment Two - 0 error(s), 4 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========


I know it's a lot to ask in terms of aid for this situation, but it would be great if someone could help me out with this problem. I do hope I've included enough information.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Jun 08, 2011 2:32 pm   Post subject: RE:Trouble setting up Visual Studio 2005

The executable file is probably saved in
Quote:

c:\Users\abrar\Desktop\Stanford\CS106B\Assignment Two\Assignment Two\Debug\

run it from your shell (command line/prompt) of choice.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
abrar1434




PostPosted: Wed Jun 08, 2011 6:07 pm   Post subject: RE:Trouble setting up Visual Studio 2005

Sorry I forgot to mention that I had tried that prior to my post. That still doesn't seem to work.

Whenever the executable is run I get two messages saying "Can't find console window" and "CSLib environment cannot initialize properly. The program cannot run."

If I take my code, and put it into an Empty Project instead of a CS106B/X C++ Assignment Wizard and remove the line #include "genlib.h" everything seems to work fine. So I had assumed the issue would have something to do with the CS106 library.

Edit: The problem has been solved.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: