Thread: environment variables for gcc

  1. #1
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    357

    Question environment variables for gcc

    What am I missing here?
    Code:
    paths() {
    	echo CPATH=${CPATH}
    	echo LPATH=${LPATH}
    	export LIBRARY_PATH=${LPATH}
    	export LD_INCLUDE_PATH=${LPATH}
    	export LIBRARY_INCLUDE_PATH=${LPATH}
    	export C_INCLUDE_PATH=${CPATH}
    	export CPP_INCLUDE_PATH=${CPATH}
    	export OBJC_INCLUDE_PATH=${CPATH}
    }
    Results in this:
    Code:
    sh build.sh (in directory: /media/zxuiji/ZXUIJI_1TB/github/lu/lu)
    CPATH=/media/zxuiji/ZXUIJI_1TB/common/lua-5.3.5/include
    LPATH=/media/zxuiji/ZXUIJI_1TB/common/lua-5.3.5
    Compiling Lu Objects
    gcc: error: ls: No such file or directory
    gcc: fatal error: no input files
    compilation terminated.
    In file included from LuScript.c:1:0:
    lu.h:34:10: fatal error: lua.h: No such file or directory
     #include <lua.h>
              ^~~~~~~
    compilation terminated.
    ...
    Last edited by awsdert; 02-04-2019 at 10:31 AM. Reason: Noticed I used the wrong directory, still same issue

  2. #2
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    357
    er never mind, just noticed I used the wrong directory despite correcting my CPATH variable, forgot the sources don't store in ./include like the libraries do, switched to ./src

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Expanding Environment Variables
    By bagel in forum C Programming
    Replies: 3
    Last Post: 11-19-2007, 05:49 PM
  2. DOS Environment Variables
    By Axpen in forum C Programming
    Replies: 0
    Last Post: 10-10-2004, 03:36 PM
  3. Windows Environment Variables?
    By sean in forum Windows Programming
    Replies: 7
    Last Post: 07-07-2003, 05:13 PM
  4. CGI Environment Variables.
    By sean in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 06-10-2002, 07:51 PM
  5. What are environment variables?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 02-18-2002, 08:11 AM

Tags for this Thread