View Full Version : how can i run my c program in ubuntu?
zdcode81
September 23rd, 2005, 03:28 AM
the problem is i am a new user of ubuntu, i have a program that i made it in c language using windows how can i run those program?
thumper
September 23rd, 2005, 04:53 AM
the problem is i am a new user of ubuntu, i have a program that i made it in c language using windows how can i run those program?
That very much depends on whether or not you are using any Windows specific C calls.
If you have a file called test.c, then you compile it with the command
gcc test.c
And run it with
./a.out
If you want to call your program foo instead of the default (which is not that usefull really), do this
gcc -o foo test.c
toojays
September 23rd, 2005, 09:40 PM
Additionally, if your program does use windows specific calls, you may be able to get it to compile in Ubuntu by installing the libwine-dev package, and using winegcc instead of gcc.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.