[英]Backslash on Include directories with pkg-config on Mac OS Lion
Good evening everybody, 晚上好大家,
I have virtually no experience with pkg-config but it seems that I will have to use it in working with openssl. 我几乎没有pkg-config的经验,但似乎在与openssl一起使用时必须使用它。 Im on a Mac, which might be of some importance.
我在Mac上,这可能有些重要。
The problem is: 问题是:
i compile my testing program with 我用编译我的测试程序
cc test.cc `pkg-config --libs --cflags openssl` -o test
pkg-config --libs
or pkg-config --cflags openssl
is -L\\~/openssl/lib -lssl -lcrypto
pkg-config --libs
或pkg-config --cflags openssl
是-L\\~/openssl/lib -lssl -lcrypto
This begs the question for me why there is a backsash and whether my compiled version is used or the preinstalled one and if the first one is the case how i could possibly fix this... 这为我提出了一个问题,为什么会有一个后退窗口,是否使用了我的编译版本或预装的版本,如果是第一个,我该如何解决呢?
Any kind of help is appreciated 任何帮助都值得赞赏
The expansion of ~
to your home directory only occurs in certain circumstances. ~
扩展到您的主目录仅在某些情况下发生。 Basically, it's the shell that's doing it. 基本上,这就是外壳程序。 If a program or a file API sees the tilde, it is interpreted as a literal;
如果程序或文件API看到波浪号,则将其解释为文字。 it's not expanded.
它没有扩展。
Use $HOME
when setting PKG_CONFIG_PATH
instead, as in $HOME/openssl
. 像
$HOME/openssl
一样,在设置PKG_CONFIG_PATH
时使用$HOME
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.