How to make g++ search for header files in a specific directory?

前端 未结 4 1643
走了就别回头了
走了就别回头了 2020-11-30 20:46

I have a project (a library) that is subdivided into a few directories with code in them. I\'d like to to have g++ search for header files in the project\'s root directory,

4条回答
  •  自闭症患者
    2020-11-30 21:36

    gcc -I/path -L/path
    
    • -I /path path to include, gcc will find .h files in this path

    • -L /path contains library files, .a, .so

提交回复
热议问题