LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 02-27-2004, 09:51 AM   #1
eBopBob
Member
 
Registered: Jan 2004
Location: Europe.
Distribution: Windows XP, openSuse 10.1
Posts: 215

Rep: Reputation: 30
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.
 
Old 02-27-2004, 09:57 AM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
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.
 
Old 02-27-2004, 11:15 AM   #3
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Rep: Reputation: 45
Dude, that's not possible. Sorry. Why would you wanna any way?
 
Old 02-27-2004, 11:28 AM   #4
luxitan
Member
 
Registered: Aug 2003
Location: Portugal
Distribution: Gentoo
Posts: 78

Rep: Reputation: 15
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 ...
 
Old 02-27-2004, 01:52 PM   #5
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
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
 
Old 02-27-2004, 01:54 PM   #6
eBopBob
Member
 
Registered: Jan 2004
Location: Europe.
Distribution: Windows XP, openSuse 10.1
Posts: 215

Original Poster
Rep: Reputation: 30
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.
 
Old 02-27-2004, 01:55 PM   #7
eBopBob
Member
 
Registered: Jan 2004
Location: Europe.
Distribution: Windows XP, openSuse 10.1
Posts: 215

Original Poster
Rep: Reputation: 30
Thanks Komakino for that, that's very helpful.
Much appreciated.
 
Old 02-27-2004, 04:53 PM   #8
Scarpa
LQ Newbie
 
Registered: Feb 2003
Location: Sydney, Australia.
Posts: 13

Rep: Reputation: 0
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?
 
Old 02-27-2004, 08:29 PM   #9
macewan
Senior Member
 
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Blog Entries: 1

Rep: Reputation: 45
qt
kdevelop
 
Old 02-28-2004, 03:47 AM   #10
eBopBob
Member
 
Registered: Jan 2004
Location: Europe.
Distribution: Windows XP, openSuse 10.1
Posts: 215

Original Poster
Rep: Reputation: 30
<< 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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dumb mac/linux question citrus Linux - Newbie 7 08-07-2005 03:40 PM
Dumb question about program architecture Metal Martian Linux - Newbie 2 04-09-2004 03:49 PM
dumb question: where are the programs? javanicus Linux - Newbie 4 06-24-2003 03:41 AM
Where do the programs I install go to???(I'm Dumb) Laxin22 Linux - General 5 01-02-2002 03:05 AM
How do I install programs? (extremely DUMB question!) Colonel Panic Linux - Newbie 3 08-21-2001 05:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration