Solved

Include paths

Posted on 1998-06-05
6
155 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 100 total points
Comment Utility
Hi, James. I think I can help if you post what your includes path is. Bye.
0
 
LVL 11

Expert Comment

by:alexo
Comment Utility
>> 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
Comment Utility
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 11

Expert Comment

by:alexo
Comment Utility
>> 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
Comment Utility
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
Comment Utility
You could have gotten your points back (since you found the answer yourself).  Too late now...
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
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 viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now