clang

clang: error: no such file or directory: '/Users/waterskiingmithrill/Development/iPhone/Event/Event_Prefix.pch'

一曲冷凌霜 提交于 2020-01-11 09:08:46
问题 I've messed up my iPhone project. I ran svn update , having fiddled with the repository months ago. Many changes since, make recovering from an old point nearly impossible. When I attempt to build the project now I get: ProcessPCH /Users/waterskiingmithrill/Library/Developer/Xcode/DerivedData/Event-cqyicuekijryjpbuuucigvdrxrdc/Build/Intermediates/PrecompiledHeaders/Event_Prefix-brpgiiwwokyynuheloumlvxlmurs/Event_Prefix.pch.pth Event_Prefix.pch normal i386 objective-c com.apple.compilers.llvm

How to get a list of all global declarations of a C/C++ program using Clang?

喜欢而已 提交于 2020-01-11 05:19:51
问题 I'm trying to write a program that lists all of the publicly exported variables and functions of a C or C++ program by using Clang. I followed part 05 of this tutorial, but it doesn't work for current version of clang. Above that, I got some hints that CompilerInstance can make the code shorter, but I'm not entirely sure how to use it. How would you implement this functionality? Can you give me any pointers into the right direction? For example: is there a large hash table of globally

gn、ninja的安装-Ubuntu18.04

不羁的心 提交于 2020-01-11 03:06:09
gn的安装需要使用ninja,所以首先安装ninja。 ninja的安装需要依赖 re2c ,gn的安装需要使用clang编译器,并且gn中使用了 C++17 ,在Ubuntu16安装的 clang-6.0 是不支持C++17的,为了方便安装转战到Ubuntu18。 每次最头疼的都是搭建环境,特别浪费时间。目标是学习gn和ninja,所以怎么方便怎么来。在Ubuntu18搭建环境要比Ubuntu16方便很多,所以选用Ubuntu18。 ninja的安装 一、安装依赖 在安装ninja之前,需要安装其依赖 re2c 。 root@ubuntu:~ # apt-get install re2c root@ubuntu:~ # re2c --version re2c 1.0.1 我安装的是 1.0.1 版本 二、下载ninja 在github中下载ninja,ninja github地址 https://github.com/ninja-build/ninja 。 git clone https://github.com/ninja-build/ninja.git 三、编译ninja 进入刚才下载的ninja目录中,执行编译脚本。 ./configure.py --bootstrap #在ninja目录中执行 四、安装ninja 编译结束后,会在ninja目录中生成ninja的可执行程序

Build llvm ClangTool

本秂侑毒 提交于 2020-01-10 14:16:23
问题 I managed to build llvm and clang and now I am trying to create a ClangTool according to clang docs. But I am getting the following error when I am trying to build it: CMake Error at tools/clang/tools/loop-convert/CMakeLists.txt:6 (target_link_libraries): The keyword signature for target_link_libraries has already been used with the target "loop-convert". All uses of target_link_libraries with a target must be either all-keyword or all-plain. The uses of the keyword signature are here: *

Build llvm ClangTool

六眼飞鱼酱① 提交于 2020-01-10 14:16:11
问题 I managed to build llvm and clang and now I am trying to create a ClangTool according to clang docs. But I am getting the following error when I am trying to build it: CMake Error at tools/clang/tools/loop-convert/CMakeLists.txt:6 (target_link_libraries): The keyword signature for target_link_libraries has already been used with the target "loop-convert". All uses of target_link_libraries with a target must be either all-keyword or all-plain. The uses of the keyword signature are here: *

Catalina C++: Using <cmath> headers yield error: no member named 'signbit' in the global namespace

守給你的承諾、 提交于 2020-01-10 14:15:31
问题 After upgrading to Catalina from Mojave, Setuping: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk in the env. I'm unable to compile a program that use <cmath> header. I tried changing CFLAGS, CCFLAGS, CXXFLAGS to point to the MacOSSDK Location that change nothing Scanning dependencies of target OgreMain /Applications/Xcode.app/Contents/Developer/usr/bin/make -f OgreMain/CMakeFiles/OgreMain.dir/build.make OgreMain/CMakeFiles/OgreMain.dir

How can I compile Boost 1.54.0 (1.54) for the iOS simulator (6.1) on OS X 10.8.4?

陌路散爱 提交于 2020-01-10 10:29:50
问题 I have successfully managed to compile several of the Boost libraries and create a framework for use with OS X, iOS, and the iOS simulator using this script: https://github.com/wuhao5/boost/blob/188e905626dbd522f65950102ed0c8ce77cb28e8/boost.sh based on Peter Goodliffe's work here: http://goodliffe.blogspot.com/2010/09/building-boost-framework-for-ios-iphone.html with Boost 1.53.0 using clang and linking against libc++. The script fails when compiling for the iOS simulator with Boost 1.54.0

Overload resolution behaviour difference between GCC and clang (SFINAE)

与世无争的帅哥 提交于 2020-01-10 00:59:32
问题 GCC accepts the following code: template <typename T> struct meta { typedef typename T::type type; }; struct S {}; template <typename T> typename meta<T>::type foo(T, S); int foo(int, int); int main() { foo(0, 0); } But clang rejects it with the following error: test.cpp:4:22: error: type 'int' cannot be used prior to '::' because it has no members typedef typename T::type type; ^ test.cpp:10:10: note: in instantiation of template class 'meta<int>' requested here typename meta<T>::type foo(T,

Static library link issue with Mac OS X: symbol(s) not found for architecture x86_64

孤街醉人 提交于 2020-01-09 11:14:06
问题 I'm trying to generate a static library and link it with an execution binary. This is a library function: #include <stdio.h> int hello() { return 10; } With these commands, I could get a static library. gcc -c io.c ar -crv libio.a io.o With lip -info , I checked it is x86_64 architecture. ar> lipo -info libio.a input file libio.a is not a fat file Non-fat file: libio.a is architecture: x86_64 This is the main function that uses the library. #include <stdio.h> extern int hello(); int main(int

brew install clang-omp not working

你说的曾经没有我的故事 提交于 2020-01-09 06:30:58
问题 I need to compile a C++ code with OpenMP on my Mac. Unfortunately the default version of clang installed on the Mac (703.0.31) does not support OpenMP. Therefore, I am trying to install the clang-omp package with brew (e.g., following this guide). The issue is that brew cannot find neither the libiomp, nor the clang-omp package: $ brew install clang-omp Error: No available formula with the name "clang-omp" ==> Searching for similarly named formulae... Error: No similarly named formulae found.