How to add include and lib paths to configure/make cycle?

后端 未结 3 1168

I need a place to install libraries in a linux box I have no su access to. I\'m using ~/local[/bin,/lib,/include], but I don\'t know how can I tell ./configure to look for l

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-12 11:33

    Set LDFLAGS and CFLAGS when you run make:

    $ LDFLAGS="-L/home/me/local/lib" CFLAGS="-I/home/me/local/include" make
    

    If you don't want to do that a gazillion times, export these in your .bashrc (or your shell equivalent). Also set LD_LIBRARY_PATH to include /home/me/local/lib:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/me/local/lib
    

提交回复
热议问题