eclipse cdt command line input

前端 未结 3 628
我寻月下人不归
我寻月下人不归 2021-01-21 03:10

I\'m new to eclipse cdt. I\'m wondering how can i add command line argument (e.g.-lm) for compiling

相关标签:
3条回答
  • 2021-01-21 03:41

    Debug-> Debug-Configurations. Select Arguments

    0 讨论(0)
  • 2021-01-21 03:45

    -lm include the math library. This is a linker parameters.

    Project Proprerties -> C/C++ build -> Settings -> GCC Linker -> Libraries -> "add the library" m

    0 讨论(0)
  • 2021-01-21 04:08

    The "correct" way is probably to include these parameters in your Makefile.

    But if you're invoking the compiler manually, you should be able to set arguments by right-clicking on the project, selecting "Properties", choosing the "C/C++ Build" entry on the menu at the left, and editing the "Build command" text field.

    Depending on the system you're in, you could potentially also choose the 'Build Variables' subentry under "C/C++ Build" and set them in CFLAGS/CPPFLAGS. Not every setup takes those into account, though.

    0 讨论(0)
提交回复
热议问题