开发者

Can I automate the finding of -l parameter I use when linking based on header files (gcc)?

Normal开发者_如何学Goly when linking against a static library, I have to specify a library directory and the name of a libX.so (or its symbolic link) as -lX flag for linking [and its directory with -L flag].

Can I automate this based on my header files (in c/c++) only? Or maybe it is not a good idea? Is there a software for locating the -L and -l parameters automatically? Is some table stored somewhere on the system about this on popular linux systems or even cygwin?


You should use pkg-config.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜