- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I include some headers in one c-file of a project. These headers are in other directories as the c-file. I can't use absolute paths to include the header files, because the headers include files in there own directory. So I open in system properties "C/C++ Inclde Paths & Symbols". Here I add via button "Add External Include Path..." the directory of the header-files and their includes. But when I compile again the compiler can't still find headers. What is going wrong? Bye, Lothar.Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
include "../../a.h" //as an example
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mountain!
Sorry, I didn't mention that I don't want to use relative paths too. I'm searching for a possibility to set include paths for the compiler for a project in Nios II. Bye, Lothar.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by maico@Oct 11 2005, 07:39 AM hi mountain!
sorry, i didn't mention that i don't want to use relative paths too.
i'm searching for a possibility to set include paths for the compiler
for a project in nios ii.
bye, lothar.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=10295)
--- quote end ---
--- Quote End --- Edit your Makefile and add -I<path-to-include-dir> to your CFGLAGS (Note: -I is a capital i not an L). After that you can include the files with# include <file> The path you give with the -I flag can be either absolute or relative. Hop this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran into the same problem. The project properties setting doesn't seem to do anything with regards to the path settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you post your makefile?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mountain!
My makefile is:ifneq ($(KERNELRELEASE),)# kbuild part of makefile
obj-m := hello.o
else# Normal Makefile
KERNEL_PLUGIN:= /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_1.4.0
KERNELDIR := $(KERNEL_PLUGIN)/linux-2.6.x
BUILDDIR := /cygdrive/c/Entwicklung/NIOS/workspace3/hello_driver_linux
all::
$(MAKE) -C $(KERNELDIR) M=`pwd` O=$(BUILDDIR) -o $@
endif
And it's making a lot of compiler errors, which caused by path problems. Bye, Lothar.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page