Solved

Include paths

Posted on 1998-06-05
6
168 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
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 …
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 the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

627 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