LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   regdef.h: No such file or directory. How can I includ files requerd by gcc? (https://www.linuxquestions.org/questions/linux-software-2/regdef-h-no-such-file-or-directory-how-can-i-includ-files-requerd-by-gcc-4175602350/)

Vido 03-22-2017 03:49 PM

regdef.h: No such file or directory. How can I includ files requerd by gcc?
 
Hi Im trying to cross-compile simple c program but Im getting folovig error

Code:

hello.S:10:20: error: regdef.h: No such file or directory
Code:

/*
 * hello-1.2/Makefile
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 1995, 1997 by Ralf Baechle
 */
#include <regdef.h>
#include <sys/asm.h>
#include <sys/syscall.h>

I have that file regdef.h but its located here
Code:

/home/slobodan/rtl819x-toolchain/toolchain/rsdk-1.5.5-5281-EB-2.6.30-0.9.30.3-110714/include/sys
I tried adding that path with

Code:

export LD_LIBRARY_PATH=/home/slobodan/rtl819x-toolchain/toolchain/rsdk-1.5.5
-5281-EB-2.6.30-0.9.30.3-110714/include/

but gcc cant find it, so what I need to do in order that gcc can find that regdef.h except coping it to /usr/include

Keith Hedger 03-22-2017 06:43 PM

you need to use the -I switch to the co piler to tell it to look in non standard places eg
Code:

gcc -I/path/to/folder/with/incudes
the LD_LIBRARY_PATH is for run time not co pile time

Vido 03-30-2017 12:02 PM

Yes thats it tnx


All times are GMT -5. The time now is 12:12 AM.