【问题标题】:using cdt eclipse and cygwin to create .so shared object on windows 7使用 cdt eclipse 和 cygwin 在 windows 7 上创建 .so 共享对象
【发布时间】:2012-11-30 09:47:24
【问题描述】:

我在 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++ 编译器?

【问题讨论】:

    标签: linux cygwin shared-libraries eclipse-cdt


    【解决方案1】:

    也许有一种方法可以完成我一直在寻找的事情,但我最终做的是让另一台运行 linux 的计算机......

    如果我愿意,我可以手动创建我的 makefile 并手动链接和编译(可能是一些花哨的批处理文件),但最终在 linux 中拥有一个完整的工作 eclipse 环境会更容易

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-13
      • 2011-02-28
      • 1970-01-01
      • 1970-01-01
      • 2011-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多