Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » using cdt eclipse and cygwin to create .so shared object on windows 7(compiling for linux on a windows machine)
using cdt eclipse and cygwin to create .so shared object on windows 7 [message #990484] Wed, 12 December 2012 16:30 Go to next message
Greg Mort is currently offline Greg MortFriend
Messages: 2
Registered: December 2012
Junior Member
I have Eclipse CDT installed (juno) on my windows 7 computer I have cygwin installed (able to manually create a makefile and create a .so)

I want to use the cygwin compiler in eclipse to create a .so

I created a new shared library project in eclipse told it to use the cygwin c++ compiler

do a ctrl-b and it creates a .dll

how do I get it to make a .so?

this is using 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.
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.
Finished building target: cygwinc++.dll


11:13:06 Build Finished (took 390ms)


clearly this is using the wrong compiler... i know that my cygwin can create SO so how to i tell it to use the "linux" c++ compiler?
Re: using cdt eclipse and cygwin to create .so shared object on windows 7 [message #990553 is a reply to message #990484] Thu, 13 December 2012 06:00 Go to previous messageGo to next message
Eclipse hates me ! is currently offline Eclipse hates me !Friend
Messages: 10
Registered: September 2012
Junior Member
You need a Windows->Linux cross-compiler to build a .so on Windows, see http://stackoverflow.com/questions/4769968/c-cross-compiler-from-windows-to-linux

But I'd rather setup a Linux VM in e.g. VirtualBox and build there, that seems like much less pain.

[Updated on: Thu, 13 December 2012 06:04]

Report message to a moderator

Re: using cdt eclipse and cygwin to create .so shared object on windows 7 [message #990612 is a reply to message #990553] Thu, 13 December 2012 12:43 Go to previous message
Greg Mort is currently offline Greg MortFriend
Messages: 2
Registered: December 2012
Junior Member
Well its for a Android build ndk, so dont see a need to have a new OS just to build part of the project...

Isn't this the point of cygwin, I can manually createa a makefile and build a so with cygwin, I just want to use that as my cross compiler, seems unneccasary to go out and find a different one when cygwin can build .so
Previous Topic:build problem
Next Topic:[Beginner help] How to make Eclipse generate binaries?
Goto Forum:
  


Current Time: Thu Apr 25 17:12:22 GMT 2024

Powered by FUDForum. Page generated in 0.03819 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top