开发者

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

开发者 https://www.devze.com 2022-12-26 23:19 出处:网络
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

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

精彩评论

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