Eclipse cdt command line input

I am new to eclipse cdt. I am wondering how to add a command line argument (e.g. -lm) to compile

+3
source share
3 answers

The “correct” way is probably to include these options in your Makefile.

But if you call the compiler manually, you can set the arguments by right-clicking on the project, selecting "Properties", selecting the entry "C / C ++ Build" in the menu on the left and editing the text field "Build Command".

, , "Build Variables" "C/++ Build" CFLAGS/CPPFLAGS. .

0

Debug- > Debug-Configurations.

+2

-lm includes a math library. These are the linker options.

Project Proprertsies → C / C ++ build → Settings → GCC Linker → Libraries → “add library” m

+1
source

Source: https://habr.com/ru/post/1731465/


All Articles