Solved

Include paths

Posted on 1998-06-05
6
166 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 5

Accepted Solution

by:
laeuchli earned 100 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
Independent Software Vendors: 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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Create and populate iFrame onClick of a button? 1 115
Adding a hidden div to each row in a table 6 114
Download a website to hdd 2 96
How to build a web site 17 104
Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

751 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