Solved

simple makefile question

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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

14 Experts available now in Live!

Get 1:1 Help Now