Thread: Linix C Programming on Windows?

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    2

    Linix C Programming on Windows?

    I'm taking a C programming in a Unix Enviroment class.
    You can tell by the name we are programming using Linux machines. What would be the easiest way to write my souce code in Windows then go into Linux. See I'm not going to install Linux on my machine but I want to be able to work on my programs at home if I need to.
    Personaly I think it would be complete waste of Time to get my hard drive in shape inorder to accept a Linux install, spend the time installing the OS just to beable to Program in C(Which I have MS Visual Studio btw)

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    202
    There's got to be some server that you are supposed to submit your programs to. Why don't you telnet to that asnd write them there. And if there is no server, my advice is you spend the 15$ a month for a shell account somewhere else. Of course you could always dual boot linux... but if you don't like any of those options and are completely adverse to dual booting, check out muLinux.... it's a single floppy distro (just boot to it, and turn the computer off to make it go away), and it does have an extension for gcc.

    starX
    www.axisoftime.com

  3. #3
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    Many Versions of Linux are now able to be run out of Windows. All that is required is some extra hard drive space. No repartitioning necessary. I'd go that way. When you're done, it's as simple as uninstalling a program or deleting a file in some cases.

  4. #4

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    44

    windows and linux

    Actually I program under windows, and linux with the exact same syntax. Everything I write under windows works perfectley under linux. Thats asuming you are writing dos/console type programs. If your writing any kind of windowed application then you'll have problems. The major difference that I encounter between windows and linux is the header files.

    However, there are many acceptions. Such as sockets programming is fairly different. But if your doing basic stuff as I did in my computer science class, it should cimpile alright under both. I use Visual C++ to write my programs. I also have a linux shell, so thats how I compile. My programs compile under Visual C++, and also compile under linux.

    I'm not an expert at linux and the differences and all that good garbage, but If I were you, try to compile a program under windows that you have wiritten in a linux enviroment, and see how it works. And like I said, it all depends on the type of programming (sockets, windowed, blah...)
    [Strut]

    I lay on my bed watching the stars, and I thought to myself... Where the hell is my roof?

  6. #6
    Unregistered
    Guest
    Strut how does the formating look from VC++ into the Linux VI Editor(do your spaces get messed up or does it stay the same)?

    BTW was is the C IO liberary in Visual C++? I know #include<iostream.h> is the C++ liberaries. isnt it <stdlib.h> or something?

  7. #7
    Registered User
    Join Date
    Oct 2001
    Posts
    375
    www.demolinux.org let you download a CD installed version of Linux that requires no hard drive space (not even a hard drive at all) to run. Very useful and comes with all kinds of nice features.. runs a tad slow when loading stuff 'cause it's all off the CD, but not too bad.

    Otherwise, you could use mingw32 as your Windows compiler, as it is a gcc port. You can even set it up with stuff like the curses lib, etc, and it is, obviously, very compatible with linux's gcc.

    -Justin
    Allegro precompiled Installer for Dev-C++, MSVC, and Borland: http://galileo.spaceports.com/~springs/

  8. #8
    Registered User
    Join Date
    Sep 2001
    Posts
    44
    I dunno, never used the linux VI editor... I only use Visual C++ to edit.

    I've never used iostream.h on linux... I'm pretty sure it has one though because people have showed me functions to use that needed the iostream.h file... All the standard libraries should work under most c/c++ compilers:

    stdlib.h
    stdio.h
    string.h
    iostream.h
    time.h

    Those are the most common ones I use. Theres probably a few more depending what kind of programming I'm doing.

    I don't think the formatting would get messed up. Because all a .c/.cpp file is, is a text file with adifferent extension on it.
    [Strut]

    I lay on my bed watching the stars, and I thought to myself... Where the hell is my roof?

  9. #9
    In The Light
    Join Date
    Oct 2001
    Posts
    598

    simple

    howdy,

    this may sound real simple but i just email my code from my linux box to my m$ box and back.
    if the school lets you have an account it works well.
    the only problems ive had going back and forth is system calls, besides that standard is standard.

    M.R.

  10. #10
    Registered User
    Join Date
    Feb 2002
    Posts
    20
    The problem with the format of the code from windows to linux is that windows/dos uses CR/LF and I believe that linux only uses LF. You can get an environment that will behave like linux for free from Cygwin Homepage. It is created with the purpose of giving the user access to the Linux/Unix specifics both on the command line and in programming.

  11. #11
    Registered User rohit's Avatar
    Join Date
    Feb 2002
    Posts
    69
    wait for sometime MSoft is coming with "we serve for u" you will be able to run linux commands and everylinux command on windows ... i dunno the exact release date .it's in beta testing

  12. #12
    Registered User
    Join Date
    Feb 2002
    Posts
    20
    I might be sounding ignorant here but where can I get information about that?

  13. #13

  14. #14
    In The Light
    Join Date
    Oct 2001
    Posts
    598

    MS again

    howdy,
    this is the first ive heard of this MS attack on linux.
    my response is.
    WTF cant MS keep thier F*****g grubby .......... paws off of anything.
    M.R.

  15. #15
    Registered User rohit's Avatar
    Join Date
    Feb 2002
    Posts
    69
    I swear, they just want to middle everywhere and expand though it's not wrong but they are cutting other's options to come up.Things are already bad everywhere.

    we were writting a pcanywhere/VNC kind of application and at the end when XP was released we realised that they already have a similar app built in XP.we had to scrap the project in between.

    now they have joined hands with mcafee for the .Net thingy.

    we have to save the planet earth from the scum of M$oft.Sun is already screwed.




    ______________________________

    let's not start a flame, but as far as i know they are testing sendmail and others similar packages .isn't that screwy. tentative month afaik is in april .

    cons::

    (1) will be running on the NT Kernel so it would be like a emulator (something i say like Wine), processing speed will deteriorate as there will be two layers of processing involved and more overhead and more MSoft-****ness.


    pros::

    (2) i think linux has some serious issues with regard to thread handling as linux is not good enough with it, let's see how good it will go along with on NT.

    (3) ./configure and makefiles will work exactly the same . so it's quite portable


    any more pointers if any one knows more about it.


    cheers
    R

    I didn't slept for the last 40 hrs. need to sleep tight now

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Anyone using Windows 7?
    By Sharke in forum General Discussions
    Replies: 60
    Last Post: 07-12-2009, 08:05 AM
  2. Dialog Box Problems
    By Morgul in forum Windows Programming
    Replies: 21
    Last Post: 05-31-2005, 05:48 PM
  3. dual boot Win XP, win 2000
    By Micko in forum Tech Board
    Replies: 6
    Last Post: 05-30-2005, 02:55 PM
  4. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM
  5. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM