我在我的 Windows 7 计算机上安装了 Eclipse CDT(juno)我安装了 cygwin(能够手动创建一个 makefile 并创建一个 .so)
我想在eclipse中使用cygwin编译器来创建一个.so
我在 Eclipse 中创建了一个新的共享库项目,告诉它使用 cygwin c++ 编译器
执行 ctrl-b 并创建一个 .dll
我如何让它制作一个.so?
这是使用 Windows 7
11:13:05 **** Build of configuration Debug for project cygwinc++ ****
make all
Building file: ../main.cpp
Invoking: Cygwin C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "../main.cpp"
cygwin warning:
MS-DOS style path detected: C:\Users\EAIGREG\workspace\cygwinc++\Debug
Preferred POSIX equivalent is: /cygdrive/c/Users/EAIGREG/workspace/cygwinc++/Debug
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Finished building: ../main.cpp
Building target: cygwinc++.dll
Invoking: Cygwin C++ Linker
g++ -shared -o "cygwinc++.dll" ./main.o
cygwin warning:
MS-DOS style path detected: C:\Users\EAIGREG\workspace\cygwinc++\Debug
Preferred POSIX equivalent is: /cygdrive/c/Users/EAIGREG/workspace/cygwinc++/Debug
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Finished building target: cygwinc++.dll
11:13:06 Build Finished (took 390ms)
显然这是使用了错误的编译器...我知道我的 cygwin 可以创建 SO 那么我如何告诉它使用“linux”c++ 编译器?