STLport安装指南(6) 7) Do "make install" to install resulting libraries into "./lib" subdirectory. 执行make install安装编译产生的库到/lib目录
==== Linking your application with STLport library ========== 链接应用程序到STLport库文件 8) Supply the "lib" subdirectory to the library search path and add desired library to the list of libraries to link with. 把lib目录加入到库文件的搜索路径中并且指定要链接的库名称。 Examples (imagine you have mytest.cpp in the same directory as this file is): With gcc : gcc -I./stlport mytest.cpp -L./lib/ -lstlport_gcc With DEC CC : cxx -I./stlport mytest.cpp -L./lib/ -lstlport_deccxx With SUN CC : CC -I./stlport mytest.cpp -L./lib/ -lstlport_sunpro ..... 例如: -gcc,gcc -I./stlport mytest.cpp -L./lib/ -lstlport_gcc -DEC CC,cxx -I./stlport mytest.cpp -L./lib/ -lstlport_deccxx -SUN CC,CC -I./stlport mytest.cpp -L./lib/ -lstlport_sunpro …… [ Visual C++ specific ] For VC++, you do not have to specify "stlport-msvc-XXX.lib" eXPlicitly, as it is being choosen and forced to link automatically by "#pragma"'s in stlport/config/stl_select_lib.h. Appropriate version is being selected based on /MD[d] vs /MT[d] options and __STL_DEBUG setting. All you have to do is to set library search path for the linker. Example : cl.exe /I.\stlport mytest.cpp /link /libpath:.\lib /MD -VC比较特殊,不需要显式的指定stlport-msvc-XXX.lib库文件,而是在stlport/config/stl_select_lib.h头文件中使用#pragma指令自动选择了链接的库文件。有些版本基于/MD[d] vs /MT[d]编译选项编译,以及设置了__STL_DEBUG编译常量。只需要按照下面的设置即可: cl.exe /I.\stlport mytest.cpp /link /libpath:.\lib /MD
9) If you linked your application with shared STLport library (.so or .dll), please make your .so or