C++ 向SCONS发送GCC标志

C++ 向SCONS发送GCC标志,c++,scons,C++,Scons,我正在使用带有以下标志的make构建一个库: INCL = `PKG_CONFIG_PATH=/mingw64/lib64/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig pkg-config --cflags ipopt` $(ADDINCFLAGS) LIBS = 'PKG_CONFIG_PATH=/mingw64/lib6

我正在使用带有以下标志的make构建一个库:

INCL = `PKG_CONFIG_PATH=/mingw64/lib64/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig pkg-config --cflags ipopt` $(ADDINCFLAGS)

LIBS = 
 'PKG_CONFIG_PATH=/mingw64/lib64/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig pkg-config --libs ipopt'
如何将其转换为使用SCON构建


我的问题是理解路径定义PKG_CONFIG_path=。。。传递给SCON。

您可能希望使用ParseFlags或MergeFlags

见:

此外,在SCons wiki中有一个合理的例子:

谢谢,env.ParseConfig'pkg-config-cflags-libs-ipopt'为我解决了。还可以使用mingw64:mingw-w64-x86_64-toolchain安装pkg config的工具链版本