Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-27-2004, 09:51 AM
|
#1
|
Member
Registered: Jan 2004
Location: Europe.
Distribution: Windows XP, openSuse 10.1
Posts: 215
Rep:
|
Dumb Question - What programs in Linux are there for me to program in C/C++?
Hi there,
This is probably a dumb question, and sorry if it is, but how and via what programs in Linux can I program Windows programs in C/C++?
Heh, really seems weird wanting to use Linux but program things for Windows PCs, heh, but anyhow - any help on this or would I have to stick to Windows to do this?
Thanks.
|
|
|
02-27-2004, 09:57 AM
|
#2
|
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185
Rep:
|
the most basic way of doing this is from command line ...
you can use a text editor such as :
vi(m)
pico
nano
emacs
just to name a few .... to code your project
and then you type :
gcc name.c
or
g++ name.cpp
to compile your projects ... the output will be an executable called :
a.out
if you want them to have specific names then type :
gcc name.c -o MyProgram
or
g++ name.cpp -o MyProgram
and in both cases the executable will be of course called MyProgram ...
but if you use GUI apps, then you can have all of the above automated for you ..
some apps include :
Kdevelop
Anjuta
Kate
gvim
xemacs
also, just to name a few ...
hope this points you in the right direction
actually i just re-read what you said ...
and to just clearify something with you, cause i know i am not removing all of what i just typed, even though it may be irrelevant ....
but when you compile these programs in linux, they are not going to run in windows
Last edited by DrOzz; 02-27-2004 at 09:59 AM.
|
|
|
02-27-2004, 11:15 AM
|
#3
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Rep:
|
Dude, that's not possible. Sorry. Why would you wanna any way?
|
|
|
02-27-2004, 11:28 AM
|
#4
|
Member
Registered: Aug 2003
Location: Portugal
Distribution: Gentoo
Posts: 78
Rep:
|
of course it's possible, he just have to compile the final version in windows, but he can code it in linux, especially if using a portable library, ex: wxWindows, GTK ...
|
|
|
02-27-2004, 01:52 PM
|
#5
|
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938
Rep:
|
Actually you're all wrong
It's entirely possible to code AND compile windows programs in linux. It's easier in QNX though...that has support for cross compiling for multiple operating systems. The Mingw C/++ compiler can be used to compile windows apps IN LINUX and you can even test them on WINE.
Here's a page about how to do it: http://rooster.stanford.edu/~ben/linux/cross.php
|
|
|
02-27-2004, 01:54 PM
|
#6
|
Member
Registered: Jan 2004
Location: Europe.
Distribution: Windows XP, openSuse 10.1
Posts: 215
Original Poster
Rep:
|
DrOzz, thank you - that was very helpful what you posted.
I'm glad you didn't delete the top part of your post, since at least now I know what programs in Linux to use to program things in.
Thanks luxitan, I may do this then.
schatoor - I was wanting to know if it's possible, since I'd very much like to do all of my work in Linux, however am going to do my MEng in Software Engineering and am going to be programming a lot of things for Windows in C and C++.
Thanks all for your help. Much appreciated.
|
|
|
02-27-2004, 01:55 PM
|
#7
|
Member
Registered: Jan 2004
Location: Europe.
Distribution: Windows XP, openSuse 10.1
Posts: 215
Original Poster
Rep:
|
Thanks Komakino for that, that's very helpful.
Much appreciated.
|
|
|
02-27-2004, 04:53 PM
|
#8
|
LQ Newbie
Registered: Feb 2003
Location: Sydney, Australia.
Posts: 13
Rep:
|
not sure (have seen it wrtten somewhere) but thought I might add that some of the latest Adobe products have been programmed on the Linux Platform.....so *shrugs* sounds interesting dont you think?
|
|
|
02-27-2004, 08:29 PM
|
#9
|
Senior Member
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Rep:
|
qt
kdevelop
|
|
|
02-28-2004, 03:47 AM
|
#10
|
Member
Registered: Jan 2004
Location: Europe.
Distribution: Windows XP, openSuse 10.1
Posts: 215
Original Poster
Rep:
|
<< not sure (have seen it wrtten somewhere) but thought I might add that some of the latest Adobe products have been programmed on the Linux Platform.....so *shrugs* sounds interesting dont you think? >>
Cool. That sounds really great.
Komakino, what is QNX? You say it's easier to do it in that, however then you go and advise to use Mingw, is it the same?
Thanks for those two macewan.
|
|
|
All times are GMT -5. The time now is 06:54 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|