tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Unable to find include directories by tcc on Catalina


From: Peng Yu
Subject: [Tinycc-devel] Unable to find include directories by tcc on Catalina
Date: Fri, 26 Mar 2021 17:39:14 -0500

Hi,

tcc can not find the include directory correctly. It seems that the
include directories are hardcoded in the tcc binary. Should they be
put in a configuration file?

How to fix this problem? Thanks.

$ cat main.c
#include <stdio.h>

int main() {
        puts("Hello World!");
        return 0;
}
$ tcc -run main.c
main.c:2: error: include file 'stdio.h' not found
$ brew info tcc
tcc: stable 0.9.27 (bottled)
Tiny C compiler
https://bellard.org/tcc/
/usr/local/Cellar/tcc/0.9.27_1 (19 files, 721KB) *
  Poured from bottle on 2021-03-26 at 17:21:54
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/tcc.rb
License: LGPL-2.0-or-later
==> Analytics
install: 49 (30 days), 138 (90 days), 544 (365 days)
install-on-request: 49 (30 days), 138 (90 days), 539 (365 days)
build-error: 0 (30 days)
$ tcc -vv
tcc version 0.9.27 (x86_64 Darwin)
install: /usr/local/Cellar/tcc/0.9.27_1/lib/tcc
include:
  /usr/local/include
  
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include
  /usr/local/Cellar/tcc/0.9.27_1/lib/tcc/include
libraries:
  /usr/lib
  /lib
  /usr/local/lib
libtcc1:
  /usr/local/Cellar/tcc/0.9.27_1/lib/tcc/libtcc1.a
crt:
  /usr/lib
elfinterp:
  /lib64/ld-linux-x86-64.so.2
$ strings $(which tcc) | grep /include
/usr/local/include:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include:{B}/include
$ ls -l 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include
ls: cannot access
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include':
No such file or directory

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]