PDA

View Full Version : Linix C Programming on Windows?



Hiroyuki
02-10-2002, 09:18 AM
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)

starX
02-10-2002, 09:26 AM
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

taylorguitarman
02-10-2002, 10:50 AM
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.

taylorguitarman
02-10-2002, 11:05 AM
This is for Red Hat -

http://www.redhat.com/docs/manuals/linux/RHL-7-Manual/install-guide/ch-part-less.html

Strut
02-10-2002, 11:28 AM
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...)

Unregistered
02-10-2002, 02:12 PM
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?

Justin W
02-10-2002, 02:29 PM
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

Strut
02-12-2002, 08:55 AM
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.

itld
02-18-2002, 11:43 AM
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.

Phylter
02-23-2002, 05:51 PM
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 (http://www.cygwin.com). It is created with the purpose of giving the user access to the Linux/Unix specifics both on the command line and in programming.

rohit
02-25-2002, 10:16 AM
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

Phylter
02-25-2002, 05:34 PM
I might be sounding ignorant here but where can I get information about that?

rohit
02-25-2002, 05:44 PM
http://google.com/search?q=cache:5aDTdZ57BcMC:www.sunhowto.org/article.php%3Fsid%3D3+microsoft+wsfu&hl=hi


from the cache

itld
02-25-2002, 06:26 PM
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.

rohit
02-25-2002, 07:21 PM
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 :D

Unregistered
02-28-2002, 05:54 PM
If I were in your shoes I'd get a POSIX compliant compiler that works in a Micro$oft environment like DJGPP. It's free and pretty simple to install.

http://www.delorie.com/djgpp/