473,386 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Problems #include'ing a file

I am working on developing a program using Visual Studio 2003 but am having
problems getting my program to find my GL.h and GLU.h, and I am guessing it
will have the same problems trying to link to the .lib and .dll files. What
do I all need to do to get this to properly compile and link. Here is what I
have done so far.

Inside my main project directory, I added a folder called "OpenGL" and
inside this folder are 3 sub-folders, "include", "lib", "bin" with the .h
files going into include, the .lib files into lib and the .dll files into bin.

I right-clicked onto my project and clicked on "Properties". In the left
list, I clicked on C\C++ and then on the sub-option "General". On the
"Additional Include Directories" I added the path
"$(ProjectDir)\OpenGL\include" to the listing. Then on the Linker option, I
added 2 paths to the "Additional Library Directories" with
"$(ProjectDir)\OpenGL\bin" and "$(ProjectDir)\OpenGL\lib".

But after doing this and cleaning my project and re-compiling, I get a whole
bunch of compiler errors saying "fatal error C1083: Cannot open include file:
'GL.h': No such file or directory". I have in my .h file added the line:

#include "GL.h"
#include "GLU.h"

Does anyone have any ideas on what else I need to do to be able to include
these files into my project? Thanks!
Sep 24 '07 #1
3 2595


"Todd Dobmeyer" wrote:
I am working on developing a program using Visual Studio 2003 but am having
problems getting my program to find my GL.h and GLU.h, and I am guessing it
will have the same problems trying to link to the .lib and .dll files. What
do I all need to do to get this to properly compile and link. Here is what I
have done so far.

Inside my main project directory, I added a folder called "OpenGL" and
inside this folder are 3 sub-folders, "include", "lib", "bin" with the .h
files going into include, the .lib files into lib and the .dll files into bin.

I right-clicked onto my project and clicked on "Properties". In the left
list, I clicked on C\C++ and then on the sub-option "General". On the
"Additional Include Directories" I added the path
"$(ProjectDir)\OpenGL\include" to the listing. Then on the Linker option, I
added 2 paths to the "Additional Library Directories" with
"$(ProjectDir)\OpenGL\bin" and "$(ProjectDir)\OpenGL\lib".

But after doing this and cleaning my project and re-compiling, I get a whole
bunch of compiler errors saying "fatal error C1083: Cannot open include file:
'GL.h': No such file or directory". I have in my .h file added the line:

#include "GL.h"
#include "GLU.h"

Does anyone have any ideas on what else I need to do to be able to include
these files into my project? Thanks!
Well I found that I already had GLU.h inside my VisualStudio directory
located at "C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\gl" but unfortunately, I cannot get it to find
this .h file. I have just used the statement

#include "GLU.h"

and it says it cannot open the include file. What do I need to do to find
the one include with my Visual Studio install? Thanks again!
Sep 24 '07 #2
>
#include "GLU.h"

and it says it cannot open the include file. What do I need to do to find
the one include with my Visual Studio install? Thanks again!
I am a moron...I needed

#include <gl\glu.h>
Sep 24 '07 #3
You might need to see if the Include directories is correctly set under
Tool->Options
->Projects and Solutions->VC++ Directories.

you might need to that include path as well.

Thanks
JP

"Todd Dobmeyer" wrote:

#include "GLU.h"

and it says it cannot open the include file. What do I need to do to find
the one include with my Visual Studio install? Thanks again!

I am a moron...I needed

#include <gl\glu.h>
Sep 25 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: middletree | last post by:
I have a page which, according to the boss's instructions, needs to show one of two things, based on which radio button was chosen on the previous page. Because these 'things' are actually some...
7
by: Vojma | last post by:
I have a problem At my site I have designed a framework with tabs as below (tabs_1.asp) +----+ +------+ +-------+ | MC | | Cars | | Boats | + +------------------------- then, into...
9
by: JR | last post by:
Hi, I'm migrating my website to an IIS 6.0 server and all the asp pages work fine except for the ones that reference include files, even though I have "Enable parent paths" enabled in the...
6
by: qaz | last post by:
I run a web site on both a testing server and a "production" server. I noticed that references to the include file do not work on the testing server but they do work on the production server. I...
9
by: Sarath | last post by:
I am working with an application using ASP, getting below error when i am trying to include new asp include file. _____________________________________________________________________ Microsoft...
10
by: Toke H?iland-J?rgensen | last post by:
Hello. I am quite new to the c++ language, and am still trying to learn it. I recently discovered how using include files would allow me to split up my code into smaller segments, instead of having...
3
by: Rick | last post by:
Is it possible to include a file from another server in html? I have typed <!-- #include file="http://Nlg-info/PESE/PESE.asp" --> is this the correct code? I cannot have the files together as...
10
by: vunet.us | last post by:
What is the workaround of passign a parameter to any included asp file: <!-- #Include File="file.asp" --> This obviously does not work: <!-- #Include File="file.asp?id=123" --> Thank you
14
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.