Solved

simple makefile question

Posted on 2006-11-21
1
218 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 50 total points
ID: 17988612
Hi,
try to use the parameter of preprocessor -I (e.g. g++ -I directory_for_headers)
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
pipe to sed or perl, please help 5 128
Linux Search 3 67
Linux : taking backup different mount points under the same directory 8 68
WiFi Router device supports GPON! 3 56
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 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