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

x
?
Solved

simple makefile question

Posted on 2006-11-21
1
Medium Priority
?
229 Views
Last Modified: 2012-05-05
Hi

I have the following structure:
mydir/inc  - has one.h two.h
mydir/src  - has myfile.cpp
mydir/output - that's where makefile is

myfile.cpp begins with
#include "one.h"
#include "two.h"

The problem with the makefile I wrote is that g++ tells: one.h no such file or directory
when I change myfile.cpp
"#include "../inc/one.h" the problem dissapears.
How do I solve the problem without changing myfile.cpp?

thnx
0
Comment
Question by:ole111
1 Comment
 
LVL 6

Accepted Solution

by:
xRalf earned 200 total points
ID: 17988612
Hi,
try to use the parameter of preprocessor -I (e.g. g++ -I directory_for_headers)
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

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

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

877 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