Solved

simple makefile question

Posted on 2006-11-21
1
220 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Chinese translation in RedHat 10 56
understanding folder structure inside an rpm 2 74
„dd“ vs „ddrescue“ 28 248
Automating a set of commands run on linux 7 100
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 fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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…

821 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