Setting C++ compile flags in xcode
I faced with the same issue for this question: Undefine symbols for architecture x86_64 using FFTWAnd I tried to use flag -L and -l for C++ in xcode, but it doesn't work Here is the error log: clang:...
View ArticleHow to set ASAN/UBSAN reporting output
I would like to run my unit test suite with -fsanitize=address,undefined and have all sanitizer errors be written to a report.txt file. By default all sanitizer errors get written to stdout, however...
View ArticleWhere does the tmpname function write temporary files in a Sun Solaris...
I am in a Unix environment (Sun Ultra 5 with gcc v.2.95.3) and I am trying to understand where my compiler writes temporary files using the tmpnam function. I am aware that this works is deprecated but...
View ArticleWhen compile llvm 3.1, why get error: expected primary-expression before ‘>’...
For some reason, I need to install llvm 3.1 or llvm 3.0, but I'm getting this error when during make. [ 5%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o In file...
View ArticleHow to resolve gcc compiler optimization-induced segmentation fault on centos...
I have a large C++ software project build with gcc. After adding some new code into the repository, one of the binary started to get Segmentation Fault on larger test data (no segfault on a few smaller...
View Articlewhen I include atomic.h, GCC says No such file, why?
I want to use atomic API, and I include . I don't know how to use it! Thank you!I have it in /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/atomic.h.I also add...
View Articlehow compile .c file when using vorbis library. undefined reference to...
I installed libvorbis-div with sudo apt install libvorbis-dev. But when i tried to compile my simple code with gcc a.c command, i get "undefined reference to `vorbis_info_init'" error. a.c#include...
View ArticleAphot installation Error with cfitsio library
I wanted to use Astrodeep Aphot library in my project whose sourcecode is mentioned here. After reading the documentation for the Aphot library, I figured I needed cfitsio library. Hence I found this....
View ArticleNeed clarification on gcc option -mcmodel=medium
I have compiled my tool on gcc-4 on which other tools are dependent. I'm being asked to use -mcmodel=medium while compiling my base code as dependent tools are encountering error: relocation overflow...
View Articleev.h C header missing
a friend of mine gave me a piece of his software and I'm trying to compile it on Ubuntu 11.04. Now gcc says that ev.h is not installed and I thought you could tell me where to get it because I did not...
View ArticleError installing python-snappy: snappy-c.h: No such file or directory
I am using amazon ec2 ubuntu 11.04 server sudo pip install python-snappy also I tried to downloaded package and entered "sudo python setup.py install"I got the error: running build running build_ext...
View ArticleWhy does this makefile fails when I remove the vpath directive?
I am playing around with GNU GCC makefiles, and made this simple one to build a "Hello, world!" program.CC=gcc SOURCES=./Source/main.c BUILD_DIR=./Build TARGET=main all: $(BUILD_DIR)/$(TARGET).exe...
View Articleis there any use for GCC -S flag with gcc -c
I wonder if there is any benefit for using the -S GCC option in my Makefiles.I've been compiling C files like the following for quite some time now:gcc -c a.c -o a.o gcc -c b.c -o b.o --- gcc a.o b.o...
View Articlestd::mutex::lock() produces weird (and unnecessary) asm code
I was checking generated asm for some of my code and my eye caught some interesting stuff:#include <mutex> std::mutex m; void foo() { m.lock(); } generated asm code (x86-64 gcc 9.2, -std=c++11...
View ArticleCompiler error using WCONTINUED option for waitpid()
I am working on an exercise to understand how signals work on a POSIX OS, but I can't figure out how to compile the example. Here is the code that I'm trying to compile:/* file sig_ex3.c: This is a...
View ArticleCompile error: "g++: error trying to exec 'cc1plus': execvp: No such file or...
When I compile C/C++ program with popen in php... I got this error:g++: error trying to exec 'cc1plus': execvp: No such file or directory but if I run php code in shell.. it works fine..in Arch...
View ArticleGCC C++ bug? (T)x matching X::operator const T&() const differs from clang's
I've encountered a discrepancy between GCC and clang (big range of versions thereof tested at godbolt - all had same discrepancy) with conversion operator matching. Now using Barry's shorter...
View Articlestackless python #pragma GCC diagnostic not allowed inside functions
I have Centos6 OS and trying to configure stackless python on it. https://github.com/python/cpythonI am keep getting below error. I am mainly a Python developer and quite confused about this error....
View ArticleCompiling Intel AVX instrinsics for Linux Device Driver with GCC
I am running gcc version 4.8.2 on ubuntu on corei7.Found about AVX intrinsics from google search, but I am not sure if this set of intrinsics can be used and compiled for Linux device driver. If it...
View ArticleHow to print result of a compile-time calculation in C++?
I've wrote several constexpr functions and use them in static_asserts to control some resource limits. But I'd like to not only enforce compile-time predicate but also to see the actual values...
View Article