Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Application and Web Development > Standard C, C++
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 03-20-2003, 11:34 AM   #1 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
Installing and using CMUgraphics library.

revision 1

Preface:
This topic covers a stepwise instruction on how to install and enable the CMUgraphics library in Visual C++ 6 Enterprise edition. This might also work on Learning editions and Pro editions as well, but I couldn't test that.

I offer the starter the correct files (in zip) to download (library) and a project (folder in zip) I made for demonstrational purposes. The project is an unfinished enterprise, dedicated to another thread in this C++ forum (started by Z~).
The relevant thread is located here:.Original thread

Downloading files
- You can download the required CMUgraphic library, header and C/C++ files from my site:
CMUgraphics for VC++
And for the Library it self (required too):
CMUGraphicsLibVC6.lib

Note: I have no idea if it is legal to distribute this library. I strongly encourage correct judicial behaviour when it comes to programming, therefore I appologise if any mis-doing from my side. Once I receive a "no-go", I will remove this file immediatly from my site.

- You can download my project files from:
HelpHIm.zip
This file is intended to give answers to Z~. Anyone might be interested too if one starts to use CMUgraphics and is perhaps a novice C++ programmer.

Discovering the downloaded required packages
1) Unzip the VC-graphics.zip folder to a temporary folder. Lets call this temporary folder: VC-TEMP.
2) Take a peek in VC-TEMP. You will see another folder called CMUgraphicsLib. That is the one we need. The rest are files for demonstrational purposes made by third parties.
3) Take a peek in the "CMUgraphicsLIb" folder. You will discover Header and C++ files. There are also C and Header files in the jpeg folder. We need all of them.
4) You have also downloaded the CMUGraphicsLibVC6.lib file. You will need this one too.

Preparing folders and files before configuring VC6
We will now make 4 folders. One main CMU folder to hold 3 sub-folders. The 3 sub-folders will contain the lib, source and header files.
1) Make a main folder to hold 3 sub-folders. Example:
E:\CustomProgrammingTools\CMU
The CMU folder is the main folder.
2) Make 3 sub-folders in CMU:
E:\CustomProgrammingTools\CMU\include
E:\CustomProgrammingTools\CMU\lib
E:\CustomProgrammingTools\CMU\source
3) We will now copy files to folders.
a) Copy ALL header files to this new "include" folder.
b) Copy ALL C/C++ files to this new "source" folder.
c) Copy "CMUGraphicsLibVC6.lib" to this new "lib" folder.

You have done the most intellectual part now. Next step is to configure VC++6 so it can handle CMU too.

Configuring VC++6
We will now setup VC++6 in such way, so it can find the CMU library and files too. It will not change the current behaviour of VC++6! You will only ADD features, but NOT remove anything, like macros or other functionality.

1) Start up Visual C++ 6. No need to open/start projects.
2) Goto "Tools->Options...->Directories".
3) Click on dropdown box "Show directories for:" and choose:
a) "Include files" then point to your very new include sub-folder.
b) "Library files" then point to your very new lib sub-folder.
c) "Source files" then point to your very new source sub-folder.

Note: Once you select the drop down box and select (for example) "Include files", you will see a dotted box in the little white window. Double-click on that. Then a "folder chooser" will appear to the right of it. Just click on the folder chooser and point to the corresponding folder. It is that simple.
DO NOT MODIFY ANYTHING. YOU ONLY NEED TO ADD STUFF.

You have now completed everything! Next step is to demonstrate on how to begin a default CMU project. There is a small pitfall.

Starting a new CMUgraphics-related project
1) Start up VC++6.
2) Goto "File->new...->Win32 Console Application".
3) Make a project name and choose to make no files at all.
4) You are now in the IDE without any files. Goto "File->New...->Files" and select the C++ file. Name it "main.cpp".
5) In "main.cpp", add your header files like <iostream.h> but also this code:
#include <CMUgraphics.h>
6) Pitfall here: Goto "Project->Add To Project->Files..".
7) Select the file "CMUGraphicsLibVC6.lib" located in your very new lib sub-folder.

You are now done!!!! Have fun if you like CMU. I don't lol.

Using HelpHim.zip.
This is nothing more but a zipped folder containing the project files that gives answers to a thread located in this C++ forum.
It is functional, demonstrating basic issues. It also contains lots of comments to help the student move on.

1) Unzip it anywhere you like.
2) Go in the unzipped folder and doubleclick on the *.dsw file.
VC++6 will start up, holding this project with all its files and dependancies.
3) Delete the library file in the project window by selecting it and then pressing the DELete key.
4) Add the CMUGraphicsLibVC6.lib again by going to "Project->Add To Project->Files..".
Select the file "CMUGraphicsLibVC6.lib" located in your very new lib sub-folder.
5) Run the program. The IDE will compile first.

Run the program and click on the upper left button. And click again. The lil box (button) will change colors, and the window title outputs the coordinates of the last mouse click.
End program by pressing the ESC button anytime and then click twice (not double-click) on the main (colored) window.

Proggie demonstrates the use of the ESC button, setting up simple objects and color schemes, mouse inputs and text output in the window-title bar. It also gives hints to basic naming conventions in the main.cpp files.

That is it folks. If you need me I'm right here :th: .
__________________
Valmont is offline   Reply With Quote
Old 03-20-2003, 01:20 PM   #2 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
Smile A few screenies always help :)

**HelpHim Project sample**
Default window after start up (HelpHim project):

Mouse click on upper left lil square. Also observe feed back on windows title bar.

Mouse click for the second time on upper left button restores colors. Title bar still gives feed back on coordinates.

Shows dependancies and lib of this project:



**Config**
Added include files. Do the same for library and source files.
__________________
Valmont is offline   Reply With Quote
Old 03-20-2003, 04:26 PM   #3 (permalink)
Travis Dane
Code Monkey
 
Travis Dane's Avatar
 
Join Date: Feb 2003
Location: Netherlands
Posts: 89
Travis Dane is on a distinguished road
Send a message via ICQ to Travis Dane
Hm Yes, Now this would fit very nicely into the Tutorial Section,
What is this library for exactly? Is it a Graphics API? Does it
run under any enviroment? What languages does it support?
Enlighten me.
__________________
OpenGL, DirectX
Travis Dane is offline   Reply With Quote
Old 03-21-2003, 05:16 AM   #4 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
It is a graphics library, made by Carnegie University (probably for tutoring excercises).
I am not going to offer support for this. I only did this project to help others out, but I am done with this.

But... if you like exploring then grab all the goodies from my webspace and see if you would like to move on with this a little bit.
I am also waiting for a response from Z~. If he manages to get the things going then maybe he can take this over.

- Val -
__________________
Valmont is offline   Reply With Quote
Old 03-23-2003, 01:41 PM   #5 (permalink)
Zenogear11
Registered User
 
Zenogear11's Avatar
 
Join Date: Mar 2003
Location: Pittsburgh
Posts: 45
Zenogear11 is on a distinguished road
Send a message via ICQ to Zenogear11 Send a message via AIM to Zenogear11
I make my response! I am using this program for school, and I find it very fun. I am only a beginning programmer, and I don't know how to fully use this program, but its fun. I got some error messages using the Help DSW file, and Can't seem to fix them
__________________
Zenogear11 is offline   Reply With Quote
Old 03-23-2003, 02:29 PM   #6 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
But wich IDE (and version) are you using?
Borland? Visual C++ 5 or 6?
__________________
Valmont is offline   Reply With Quote
Old 03-25-2003, 03:17 PM   #7 (permalink)
Zenogear11
Registered User
 
Zenogear11's Avatar
 
Join Date: Mar 2003
Location: Pittsburgh
Posts: 45
Zenogear11 is on a distinguished road
Send a message via ICQ to Zenogear11 Send a message via AIM to Zenogear11
Sorry for the late reply, I am using Visual C++ 6. If that anwsers your question. Also, all the errors I am getting from the Help.dsw relate to STRING.
__________________
Zenogear11 is offline   Reply With Quote
Old 03-25-2003, 05:03 PM   #8 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
Idea

Why not starting over fresh. Un-install then re-install.
Then follow the step-by-step guidelines I posted on top of this thread.
You saw the screenies I think. It works .

- Val -
__________________
Valmont is offline   Reply With Quote
Old 03-28-2003, 11:34 AM   #9 (permalink)
Zenogear11
Registered User
 
Zenogear11's Avatar
 
Join Date: Mar 2003
Location: Pittsburgh
Posts: 45
Zenogear11 is on a distinguished road
Send a message via ICQ to Zenogear11 Send a message via AIM to Zenogear11
New Problem

I Installed CMU graphics and got MOST stuff working. I have only 1 fatal error.

LINK : fatal error LNK1104: cannot open file "..\..\CMU\lib\CMUGraphicsLibVC6.lib"



How do I fix it? I have tried uninstalling an re-installing. Nothing works
__________________
Zenogear11 is offline   Reply With Quote
Old 03-28-2003, 12:11 PM   #10 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
A few checks...

1)
Did you do these 2 steps?
Quote:
6) Pitfall here: Goto "Project->Add To Project->Files..".
7) Select the file "CMUGraphicsLibVC6.lib" located in your very new lib sub-folder.
2)
Did you actaully place the lib file in the lib folder?

3)
Do you recognize this picture (with the lib in it)?


4)
If you downloaded my HelpHim file then try removing allt he workspace and make files. Jus keep the main.cpp file only!
Then rebuild. If the IDE asks you whether it should make a default workspace then say "yes".


5)
Check in "Tools->Options...->Directories" if the settings are still there for the lib folder:
Quote:
1) Start up Visual C++ 6. No need to open/start projects.
2) Goto "Tools->Options...->Directories".
3) Click on dropdown box "Show directories for:" and choose:
a) "Include files" then point to your very new include sub-folder.
b) "Library files" then point to your very new lib sub-folder.
c) "Source files" then point to your very new source sub-folder.
You have icq?
__________________
Valmont is offline   Reply With Quote
Old 03-29-2003, 03:58 AM   #11 (permalink)
Zenogear11
Registered User
 
Zenogear11's Avatar
 
Join Date: Mar 2003
Location: Pittsburgh
Posts: 45
Zenogear11 is on a distinguished road
Send a message via ICQ to Zenogear11 Send a message via AIM to Zenogear11
No, I dont have ICQ, I have AIM, and the LIB file is in the folder, and I recognize that screen, if you want I could get ICQ


Edit: Got ICQ my number is 328444114 if you can talk
__________________
Zenogear11 is offline   Reply With Quote
Old 03-29-2003, 07:57 AM   #12 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
Added you to my list (icq).

IM sent. Cya laters

- Val -
__________________
Valmont is offline   Reply With Quote
Old 03-29-2003, 08:39 AM   #13 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
Oh my...

You need to DELETE CMUGraphicsLibVC6.lib in your project window and RE-add the library!!!

See this pic?



Click on the library and press DEL key.
Then go to "Project->Add To Project->Files..".
Select the file "CMUGraphicsLibVC6.lib" located in your very new lib sub-folder.

I bet this is gonna work!!!

- Original tutorial in this thread is revised: Using HelpHim section is corrected.
- Main.cpp file in HelpHim project contains a few more comments.
__________________
Valmont is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 04:42 AM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle