Questions tagged [cflags]

CFLAGS are switches that can be passed to the C compiler while compiling software.

CFLAGS are switches that can be passed to the C compiler while compiling software. CFLAGS are normally used inside Makefiles to have the same set of flags for the compilation.

CFLAGS can also be provided from outside of the Makefile via environment variables.

75 questions
0
votes
1 answer

Set Xcode flags in order to embed python in my C++ project

I'm trying to embed python in my C++ project. I need to do it in order to use some functions that implement the Kolmogorov-Smirnov Test that are not available in C++. For now I'm just trying to see if Xcode is able to link and compile a simple…
jackscorrow
  • 682
  • 1
  • 9
  • 27
0
votes
1 answer

Identical Makefile nomenclature for using variable on different build commands with different results

There are three programs build by this Makefile. They follow the same pattern, but produce different build commands when run. Specifically, I require compilation with c++11 but can only achieve this on one of the build commands. Why is…
errolflynn
  • 641
  • 2
  • 11
  • 24
0
votes
0 answers

cmake: c++: error: ${CFLAGS}: No such file or directory

I'm trying to follow this cmake tutorial. But when it comes to calling cmake for the first time I get the following error: cmake -G "Unix Makefiles" .. --debug-trycompile debug trycompile on -- The C compiler identification is GNU 6.3.1 -- The CXX…
BoshWash
  • 5,320
  • 4
  • 30
  • 50
0
votes
1 answer

Use arm-none-eabi-gcc to invoke arm-none-eabi-ld?

I built up a tool chain with gcc-6.2 with all the latest components. CC = arm-none-eabi-gcc AS = arm-none-eabi-as LD = arm-none-eabi-ld My Makefile flags are: CFLAGS = -std=c11 -Wall -Werror -Wfatal-errors -Wstrict-prototypes -Wundef…
rsun
  • 63
  • 1
  • 7
0
votes
1 answer

Remove a compiler / linker flag from autotools configure

There is a project (Antlr3 for C) that can be built with ./configure && make && make install. One of the flags that are used in the compilation command is -Wl,-soname -Wl,libantlr3c.so. The whole command is: libtool: link: gcc -shared …
jleeothon
  • 2,907
  • 4
  • 19
  • 35
0
votes
1 answer

CFLAGS variation for modules in makefile

I'm working on a large firmware and I've to add GNU gprof to only some modules(file directories) of it. The makefiles have inherited structure. So I do it this way: ft/*.o : ft/*.c CFLAGS += -pg ft/*.o : ft/*.c LDFLAGS += -pg But this…
0
votes
1 answer

Edit Makefile line: CFLAGS from Qt C++

I'm quite new to programming but I got really stuck with this so I hope you can help me. I got a problem using the openssl/hmac.h the Error Output: undefined reference to EVP_sha1 So I googled and found…
MuchWow
  • 35
  • 2
  • 7
0
votes
1 answer

404 error at the json request- Passed all the headers possible but no luck

I am trying to login to an application and it has text/html and some application/json. I am able to login to the application from the previous request but I believe the json is loading some additional data and it is giving me a 404 error. I tried…
0
votes
0 answers

Error: Recompile with -fPIC when trying to ./configure && make package nap

I am trying to configure and make install package nap6.4 for tcl, but it fails in during "make" with the following error: cc -shared -o libnap6.4.so cart_proj.o eval_tree.o function.o geometry.o land_flag.o land_flag_i.o linsys.o nap.o…
0
votes
1 answer

How to change VAR name without getting the undeclared error after 'make install'?

My configure.in file has: VAR=yo AC_SUBST(VAR) Makefile.am has: bin_PROGRAMS = hello hello_SOURCES = hello.c hello_CFLAGS =-DVAR=@VAR@ C file is: #include int main() { printf("%s\n",VAR); return 0; } When I do 'make install'…
albertpod
  • 155
  • 2
  • 11
0
votes
1 answer

Reusing Slightly Altered Makefile for Slightly Altered Program Gives Error

I made a copy of a makefile that worked for program A for a new program called program B. To keep things simple program B has all of the same include directives as program A. The only changes made to the new makefile are the obvious changes to the…
Luca
  • 515
  • 5
  • 17
0
votes
1 answer

error: 'CFLAGS' does not name a type

This is my makefile: CFLAGS=-Wall -g -O2 clean: rm -f ex1 And when I run a script, for example, this one (ex3.c): #include int main() { int age = 10; int height = 72; printf("I am %d years old.\n", age); printf("I…
Farid
  • 11
  • 2
0
votes
1 answer

Skipping incompatible error

I downloaded nettle 3.0 cryptography library and i compiled it on ubuntu. I ran an example and it s working fine on ubuntu. I added the compiled static library file (libnettle.a) to the my project makefile in contiki ,by simply adding: LDFLAGS+=…
yushaa yave
  • 145
  • 1
  • 9
0
votes
1 answer

Pass variable to make CFLAGS in shell script?

I'm trying to build some c programs with gnu make (4.1) through a shell script. I want to use different CFLAGS parameters, which I read from a file. The file contains lines like: "-O1 -freorder-functions" I am trying to do something like while…
mijiturka
  • 434
  • 6
  • 18
-1
votes
1 answer

CMake CXXFlags -O2 / -O3

I'm not really familiar with CMake at all but I got the task to clean-up the CXXFlags that are used (-O2 and -O3). The Log prints out: "USING CXXFLAGS = '-g -O2 -fdebug-prefix-map=/build/cgal-ZyilPF/cgal-4.11=. -fstack-protector-strong -Wformat…
lmschwarz
  • 1
  • 2
1 2 3 4
5