Thread: New to Linux, developing on Cygwin - unforseen problems?

  1. #1
    Registered User gardhr's Avatar
    Join Date
    Apr 2011
    Posts
    151

    New to Linux, developing on Cygwin - unforseen problems?

    Greets. Are there any major issues WRT developing Linux apps using Cygwin? I will have access to a real Linux box for testing purposes, but I'd still like to use my Windows machine for day-to-day development. Has anyone here much experience with such a setup?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    For possible issues with using Cygwin
    Cygwin FAQ

    But why not consider using either VmWare player or VirtualBox to install a REAL Linux inside a virtual machine on your windows OS?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User gardhr's Avatar
    Join Date
    Apr 2011
    Posts
    151
    Thanks. Yes, that would be ideal but probably unworkable due to the fact that I've got sources that need to be available for both systems. Syncing everything would just be too much trouble, I think. Then again, I guess I could compile using Cygwin, then somehow copy the binaries over to VmWare to test the code. That should work, right?

  4. #4
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by gardhr View Post
    Then again, I guess I could compile using Cygwin, then somehow copy the binaries over to VmWare to test the code. That should work, right?
    That wouldn't work, because a Cygwin binary is a Windows program. (EDIT: I guess you could run it in Wine, but that would be crazy)

    Cygwin is really just a POSIX layer for Windows. If your program builds and works using Cygwin on Windows, chances are it will work when built and run on Linux, but you need to build it using a Linux system.

    At home I run various Linuxes in VirtualBox (free) and use vboxsf to share files between Windows and the Linux VMs. It isn't hard to set it up.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Like brewbuck says, it couldn't be any simpler.
    Just make your code directory shareable in VirtualBox and you can edit to your hearts content in either OS and compile in either OS as well.

    > At home I run various Linuxes in VirtualBox (free) and use vboxsf to share files between Windows and the Linux VMs.
    It works the other way too
    Linux host, sharing a directory visible to windows running in a VM.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Registered User gardhr's Avatar
    Join Date
    Apr 2011
    Posts
    151
    Perfect! I won't even bother with Cygwin then. I've already installed VirtualBox and now downloading the Ubuntu ISO. Can't wait to try it out!

  7. #7
    Registered User gardhr's Avatar
    Join Date
    Apr 2011
    Posts
    151
    Works great. I can switch between development environments without any problems whatsoever. Still haven't figured out how to automatically mount the share folder, though - no biggie, a simple bash script will do the trick for now. Thanks for the advice, fellas.

    P.S. - Posted this from Ubuntu, btw! How cool is that?
    Last edited by gardhr; 04-27-2011 at 07:31 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems using CYGWIN
    By mykolg in forum C Programming
    Replies: 12
    Last Post: 11-21-2010, 01:08 PM
  2. Developing In Linux With OpenGL
    By IdioticCreation in forum Linux Programming
    Replies: 5
    Last Post: 06-04-2007, 04:16 AM
  3. cygwin problems
    By sworc66 in forum Tech Board
    Replies: 1
    Last Post: 08-12-2003, 04:33 AM
  4. Cygwin and Linux
    By Jaguar in forum Linux Programming
    Replies: 1
    Last Post: 12-18-2002, 11:06 AM