Compiler flags in Eclipse

前端 未结 1 1012
星月不相逢
星月不相逢 2021-01-26 04:05

My build requires that I issue the following commands:

$ g++ sniff.cpp -o sniff -lcrafter 

However, in my Eclipse build, all the complier gets

1条回答
  •  礼貌的吻别
    2021-01-26 04:54

    Include libraries:-

    right click on the project -->

    1. Goto Properties
    2. then goto --> C/C++ Build --> Settings

    There you will find Linker and sub type Libraries.

    Add the library path in Library Search Path on right hand side (where your .so file is located) and give the lib name in libraries

    for libcrafter.so path --> /opt/myLib/lib

    give path as /opt/myLib/lib and library name as crafter

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