Home  >  Q&A  >  body text

linux - How to configure the parameters compiled in the terminal to kdevelop (IDE)?

I need to use GLPK (linear programming package) under ubuntu. After writing the cpp file, enter

in the command line.
gcc -c sample.cpp
gcc sample.o -lglpk -lm

The a.out executable file is finally generated.
Now I want to execute the above process under kdevelop. How should I set the parameters -lglpk -lm?
Is it written in the makefile?

Thank you all!

淡淡烟草味淡淡烟草味2713 days ago450

reply all(1)I'll reply

  • 某草草

    某草草2017-05-16 13:26:21

    Add to CMakeLists.txt

    include_directories(glpk.h /usr/local/include)
    target_link_libraries(d /usr/local/lib/libglpk.a)

    Here d is the name of the executable file generated by your project

    reply
    0
  • Cancelreply