Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual C++ Express Problem

Status
Not open for further replies.

skaterkid

Programmer
Dec 31, 2006
4
CA
Ok well my problem kind of has two parts. I am a 15 year old boy and I just started programing with the C++ OpenGL libraries. I was using Visual C++ 6.0 but for some reason randomly I would be compiling or building my projects and the build would never finish causing me to force quit. If any one has a solution to that it would be great and thank you it would save me a lot of time. So the second part to this question is, after trying to solve the VC++ 6.0 problem I gave up and downloaded Visual C++ Express Edition. Now I was wondering dose it come with the GL libraries? If s how do I link my projects to them?
 
Age isn't a problem - never too young or too old to start

Have you applied the latest service packs to VC6? I know it randomly stops on the initial version of VC6 or with very complex projects but if you have just started, it won't be that complex and it shouldn't stop.

Another possible cause is recursive headers. It may be that you have tons of disk space and tons of memory so recursive headers will take ages before they run out of space.
 
I have not yet applied any service packs since I installed VC6. Are they distributed free of charge and if so is there a site I can download them from? Also I do have a lot of disk space and memory. If the service packs don't fix it how do I solve the recursive header problem?
 
how do I solve the recursive header problem?

Three possibilities:

1. Remove recursive #include instructions.

2. Add following lines to all your headers:

Code:
#ifndef my_first_header_included
#define my_first_header_included

<...> // header body

#endif

3. Do not use #include instructions inside of headers at all - only in .cpp files.
 
Ok well thank you mingis thats very helpful, in the future I will only use #include in my .cpp files and not my .h headers. Also I would still like to update Visual Studios 6.0 with the service packs. Where about do I find the latest service pack update?
 
You still need to use #include in header files if your header file references a type that is defined in another header file such as <string> <list> <vector>... Just don't include things in your header that are used exclusively in your .cpp files.

You should ALWAYS use guard definitions in all your header files (i.e. #2 in mingis's post).
 
Well I'm only linking to the GL library headers but that will come in handy if I write my own header files. Now dose anyone have the link to the latest Visual Studios 6.0 service pack update? I think updating VC6 would be wise so that I wont run into any other glitches or bugs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top