我使用MinGW构建共享库,而不是将WChar_t视为内置类型。UShort; // Treat as Built In typedef unsigned short UShort; // NOT treated as Built In当将共享库与一个小程序链接时,
g++ -o helloworld main.cpp -I.//默认情况下
在Solaris平台上,要从源文件(a.c)创建共享库,我使用以下命令:a成为一个共享库,a.c包含以下代码:{如果我尝试不使用-G选项,即编译为:它得到一个链接器错误:Undefined Symbol maing++: error: unrecognizedcommand line option -G