Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » setting up cdt on win32 to be able to develop linux code
setting up cdt on win32 to be able to develop linux code [message #59898] Tue, 28 January 2003 11:49 Go to next message
Eclipse UserFriend
Originally posted by: robert.varga.fathomtechnology.com

Hello All,

I would like to develop a C++ project for linux, but on some of the machines
there is windows installed. Is it possible to develop linux code (compile,
and
link, debug is not necessary at first) in Eclipse + CDT on win32?

Regards,

Robert Varga
Re: setting up cdt on win32 to be able to develop linux code [message #60103 is a reply to message #59898] Wed, 29 January 2003 13:01 Go to previous messageGo to next message
Radu-Adrian Popescu is currently offline Radu-Adrian PopescuFriend
Messages: 4
Registered: July 2009
Junior Member
What do you understand by linux code ?
If it means taking your project from linux as is, (maybe cut some corners
with shell utilities),
make minor changes to the makefile (as in RM=del a.s.o.), then importing the
project into eclipse
and use the makefile and gcc/g++ (i'm using the ones from DevC++ - see
sourceforge), and after you're
done with coding and testing you take the project to linux and compile
again, then yes.
:)
HIH

--

=====
Radu-Adrian Popescu
CSA, DBA, Developer
Aldratech Ltd.
"Robert Varga" <robert.varga@fathomtechnology.com> wrote in message
news:b15pjn$kq3$1@rogue.oti.com...
> Hello All,
>
> I would like to develop a C++ project for linux, but on some of the
machines
> there is windows installed. Is it possible to develop linux code (compile,
> and
> link, debug is not necessary at first) in Eclipse + CDT on win32?
>
> Regards,
>
> Robert Varga
>
>
Re: setting up cdt on win32 to be able to develop linux code [message #60177 is a reply to message #60103] Wed, 29 January 2003 15:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: robert.varga.fathomtechnology.com

My problem is that the libraries provided by either cygnus or mingw32
(devc++ uses
mingw32) are not the same as linux libraries. Therefore my code which
compiles on linux
does not compile with cygnus or mingw32.

I would like to use Eclipse on Win32.
I would like to compile with the libraries found on Linux and not with
those in cygwin or mingw32.
I would like to link with the linux libraries and not with those in cygwin
or mingw32.

It is probably possible, I just don't know how to set up gcc for it
correctly.

I would probably need to get the libraries from a linux machine, but I don't
know exactly which directories. Also I would need to somehow tell gcc
to use those directories as includes and libraries, and probably to generate
ELF code.
I also may need to override the default -D options.

What I would need to know is how to do the above mentioned tasks.

Regards,

Robert Varga




"Radu-Adrian Popescu" <radu.popescu@aldratech.com> wrote in message
news:b18i0g$lfh$1@rogue.oti.com...
> What do you understand by linux code ?
> If it means taking your project from linux as is, (maybe cut some corners
> with shell utilities),
> make minor changes to the makefile (as in RM=del a.s.o.), then importing
the
> project into eclipse
> and use the makefile and gcc/g++ (i'm using the ones from DevC++ - see
> sourceforge), and after you're
> done with coding and testing you take the project to linux and compile
> again, then yes.
> :)
> HIH
>
> --
>
> =====
> Radu-Adrian Popescu
> CSA, DBA, Developer
> Aldratech Ltd.
> "Robert Varga" <robert.varga@fathomtechnology.com> wrote in message
> news:b15pjn$kq3$1@rogue.oti.com...
> > Hello All,
> >
> > I would like to develop a C++ project for linux, but on some of the
> machines
> > there is windows installed. Is it possible to develop linux code
(compile,
> > and
> > link, debug is not necessary at first) in Eclipse + CDT on win32?
> >
> > Regards,
> >
> > Robert Varga
> >
> >
>
>
Re: setting up cdt on win32 to be able to develop linux code [message #60295 is a reply to message #60177] Thu, 30 January 2003 21:01 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 4
Registered: July 2009
Junior Member
You are talking about setting up a cross-compiler from with
host=i386-pc-mingw and target=i386-linux-gnu right? I know that a
prepackaged version of MinGW is available for more than one linux
distribution, to compile for a Win32 target from a Linux host. _Very_
recently, a Debian maintainer has been working on a standard MinGW package
that would be auto-built for every hardware platform that Debian runs on.
But I think that to get the opposite, you will have to build everything up
yourself. Most linux users would probably consider the idea perverse.
Try this link: http://www.mingw.org/mingwfaq.shtml#faq-cross for more
information about cross-compiling.

If you want to use libraries that are commonly found on *nix in a Win32
program, there are a handful of libraries that work without emulation. Best
bet is to go googling for whatever you need, but AFAIK Linux binaries cannot
run on a M$ OS - you must recompile them.

HTH,
Jon

"Robert Varga" <robert.varga@fathomtechnology.com> wrote in message
news:b18rgb$upn$1@rogue.oti.com...

> It is probably possible, I just don't know how to set up gcc for it
> correctly.
>
> I would probably need to get the libraries from a linux machine, but I
don't
> know exactly which directories. Also I would need to somehow tell gcc
> to use those directories as includes and libraries, and probably to
generate
> ELF code.
> I also may need to override the default -D options.
>
> What I would need to know is how to do the above mentioned tasks.
>
> Regards,
>
> Robert Varga
Re: setting up cdt on win32 to be able to develop linux code [message #60343 is a reply to message #59898] Fri, 31 January 2003 07:42 Go to previous message
Eclipse UserFriend
Originally posted by: johan.nosp.m.appeal.se

If you have (network) access to a Linux machine that you can build on,
try this:

1. Set up ssh to use key-based authentication (so you don't have to use
a password for ssh:ing to the Linux machine).
2. See to that you have your Eclipse working directory mounted on both
the Windows machine and the Linux machine.
3. Change your build command to "ssh thelinuxmachine make -C
/wherever/you/store/your/sources".

This works fine for me when developing for Linux/IA64 (where I can't run
Eclipse because of bug 27577). I am on a 32 bit Linux machine myself,
so I can't tell if this works from Windows as well. On the other hand I
can't see why it wouldn't.

Cheers //Johan

Robert Varga wrote:
> Hello All,
>
> I would like to develop a C++ project for linux, but on some of the machines
> there is windows installed. Is it possible to develop linux code (compile,
> and
> link, debug is not necessary at first) in Eclipse + CDT on win32?
>
> Regards,
>
> Robert Varga
>
>
Previous Topic:Memory in Debugger
Next Topic:CDT usable with M4
Goto Forum:
  


Current Time: Sun Jul 07 11:23:43 GMT 2024

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

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

Back to the top