How to compile a C project in Netbeans using -lm -

2019-08-08 05:28发布

问题:

I'm having a problem with compiling a C program in Netbeans. I can complile it with no problem in Shell using this command line: gcc test.c -o test -lm -pthread. Is it possible to configure Netbeans to compile the project with the -lm and -pthread arguments?

回答1:

Right click on your project (in the project tree) and choose "Project properties".

Then navigate to "Compiling" under "Build" and then there should be a field "Additional Compiler Options".