Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Include paths

Posted on 1998-06-05
6
Medium Priority
?
175 Views
Last Modified: 2013-11-18
I'm using g++ to compile OpenGL apps, but because our system doesn't have GL I had to compile and install it into my user directory. The problem is that although the -L option works OK for the libs, I can't specify the path to the include files which need to be called as <Xm/Xm.h> or <GL/gl.h> in the code to be portable to my home linux system.

I've tried doing "-Ipath" and "-I- -Ipath" in the Makefile as it says on the man page for g++, but the compiler still can't find the includes.

Thansk for any help,
James
0
Comment
Question by:jhubbard
  • 3
  • 2
6 Comments
 
LVL 5

Accepted Solution

by:
laeuchli earned 300 total points
ID: 1165285
Hi, James. I think I can help if you post what your includes path is. Bye.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1165286
>> I can't specify the path to the include files which need to be called as <Xm/Xm.h> or <GL/gl.h> in the code [...]

You have to set your include path to one directory above the Xm.h and gh.l files.  You also may need to use multiple include paths, e.g., /foo/bar;/googoo/gigi;/and/another/one.

laeuchli, locking the question before providing a valid answer is EXTREMELY bad form and usually results in complaints to EE administration.
0
 
LVL 5

Expert Comment

by:laeuchli
ID: 1165287
Sorry, but I thought it was a good practice. I have seen many experts do it so I thought it was ok. Well sorry.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:alexo
ID: 1165288
>> I have seen many experts do it so I thought it was ok.
Not really.  Most of the experts that lock a question before providing an answer follow up with a really long and detailed explanation in a comment after 5-15 minutes (which is the time that takes them to type it in an organized way).

jhubbard, I don't know what the behavior of the "-I" argument of your compiler is but I guess it is cumulative.  In that case try: "-I<path-to-GL> -I<path-to-Xm> ..."
0
 

Author Comment

by:jhubbard
ID: 1165289
Thanks, I just found out that this system actually has OpenGL, but hidden in some obscure and arbitrary directory. You'd think experienced sysops could organise where to put libraries, but noooo......

Oh well, thanks anyway.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1165290
You could have gotten your points back (since you found the answer yourself).  Too late now...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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 the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

972 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