C Board  

Go Back   C Board > Community Boards > Tech Board

Reply
 
LinkBack Thread Tools Display Modes
Old 03-28-2005, 04:19 PM   #1
Registered User
 
Join Date: Mar 2005
Posts: 2
Windows or Linux?

Hello all!

I am planning on learning C++ and I was just wondering if it really mattered which OS I used. I just put Linux on an old computer that I had, as something else to learn in my spare time.

Can you compile programs for windows on a linux box and vice versa?

Thanks in advance!
toybox410 is offline   Reply With Quote
Old 03-28-2005, 04:29 PM   #2
Registered User
 
Join Date: Jan 2005
Posts: 847
If the programs stick to the c++ standard then yes. But to do some things will require OS specific functions.
I would say for learning the c++ language it dosen't matter what OS you use.
Quantum1024 is offline   Reply With Quote
Old 03-28-2005, 05:24 PM   #3
Registered User
 
Join Date: Nov 2004
Posts: 86
I would say use linux

the environment is much nicer, plus I just hate windows, vc++ is annoying to learn

Plus, most of the GUI API's one woudl use on linux have a windows version, so the code can be very easily ported

go with linux
pktcperlc++java is offline   Reply With Quote
Old 03-28-2005, 08:41 PM   #4
Hardware Engineer
 
Join Date: Sep 2001
Posts: 1,398
Quote:
Can you compile programs for windows on a linux box and vice versa?
Generally no. But, if you write ANSI/ISO Standard C++ code, it can be re-compiled for any platform (on the new platform) if it has a compiler.

However, there is no sound, graphics, color, or mouse in Standard C++. Most real-world programs have some system-specific (non-portable) code.

A compiler that makes executable code for a different system is called a cross-compiler. Typically, cross-compilers are used for embedded system development. If you're writing code for an automobile ignition system, you would might develop it (and compile it), on a PC using special-purpose development software, then transfer the executable hex-code to the embedded system. That system may have a non-Intel CPU, and it may have another operating system, or no operating system at all.
DougDbug is offline   Reply With Quote
Old 03-28-2005, 11:49 PM   #5
Registered User
 
Join Date: Sep 2004
Posts: 720
as much as i hate to say it, i would recommend windows vc++ for the shear fact that you can get very quickly look things up via vc++'s help.

another thing i hate to say is that *most* (give or take) useful programs are OS dependant in my opinion. you can write console programs for both OS's, but you must adhere to the standard. as far as learning c/c++ goes however, there's only slight differences between OS's. the more low-level or specific you get, the more platform depedant you get. but for learning the language, it's syntax, and it's basic functions, whichever OS (or both) you feel more comfortable with is probably the right one. don't get me wrong, you can write portable, usefull programs but in my opinion, most of them aren't 100% portable.

i'm a little drunk, so if the above doesn't make much since, let my point be:
You'll know when to be concerned about which OS you're coding for when you get there.
__________________
Quote:
i seem to have GCC 3.3.4
But how do i start it?
I dont have a menu for it or anything.
misplaced is offline   Reply With Quote
Old 03-29-2005, 01:22 AM   #6
Budding Synth Programmer
 
samGwilliam's Avatar
 
Join Date: Feb 2002
Location: Trefforest
Posts: 368
Quote:
Originally Posted by misplaced
as much as i hate to say it, i would recommend windows vc++ for the shear fact that you can get very quickly look things up via vc++'s help.

another thing i hate to say is that *most* (give or take) useful programs are OS dependant in my opinion. you can write console programs for both OS's, but you must adhere to the standard. as far as learning c/c++ goes however, there's only slight differences between OS's. the more low-level or specific you get, the more platform depedant you get. but for learning the language, it's syntax, and it's basic functions, whichever OS (or both) you feel more comfortable with is probably the right one. don't get me wrong, you can write portable, usefull programs but in my opinion, most of them aren't 100% portable.

i'm a little drunk, so if the above doesn't make much since, let my point be:
You'll know when to be concerned about which OS you're coding for when you get there.
MSDN is online now.
samGwilliam is offline   Reply With Quote
Old 03-29-2005, 01:27 AM   #7
Registered User
 
major_small's Avatar
 
Join Date: May 2003
Posts: 2,787
please don't think that you need to use VC++ to code in C++ on windows. MingW has ported GCC to windows, so as long as you have standards-compliant code, it'll run fine. if you're just starting out, it doesn't really matter which OS you use, but for more real-life programming, you're going to have to learn a little OS-specific code. I'd say this mostly is determined by your job though.

note: the MingW port of GCC can be found in Dev-C++
__________________
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech


Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)

The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
major_small is offline   Reply With Quote
Old 03-29-2005, 11:39 AM   #8
and the hat of Jobseeking
 
Salem's Avatar
 
Join Date: Aug 2001
Location: The edge of the known universe
Posts: 21,710
If you're planning to learn C++, then you'll need either a fairly recent version of GCC (either gcc on linux, or one of the windows ports like dev-c++, mingw, cygwin, djgpp), or the latest microsoft .net compiler.

VC++ version 6 is so old and out of touch with respect to the C++ standards that it won't be long before you bump into some weirdness.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Salem is offline   Reply With Quote
Old 03-29-2005, 12:21 PM   #9
Registered User
 
Join Date: Mar 2005
Posts: 2
Thank you everyone for your input. I think that I am going to start to learn in Windows, only because I am more comfortable in it. I may switch over to Linux at a later date, once I get some more experience with it. I downloaded Bloodshed Dev-C++ so expect more questions from me soon.

Thanks again.
toybox410 is offline   Reply With Quote
Old 03-29-2005, 03:02 PM   #10
Registered User
 
Join Date: Dec 2004
Posts: 465
I have a desktop PC and a mac laptop. I've never used Linux. I only program on my PC because my Xcode compiler for mac has insane amounts of errors because its on Mac and I don't want to mess with that stuff. I don't know one bit of vc++ who says you have to learn it just because you have windows?
__________________
My computer is awesome.
cerin is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thinking of upgrading to linux... Yarin General Discussions 37 07-24-2009 11:40 AM
Build linux on windows baash05 Linux Programming 6 02-19-2008 10:12 PM
windows .dll vs. linux .so - global static objects pheres C++ Programming 6 08-22-2007 12:07 PM
Why can't Windows run Linux binary executables? Kleid-0 Tech Board 30 12-04-2005 11:44 PM
Linux and Windows Duel Boot The15th A Brief History of Cprogramming.com 7 04-26-2002 04:59 AM


All times are GMT -6. The time now is 03:31 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22