Question:
Can you write software for windows on a mac?
jmif96
2008-06-15 22:04:32 UTC
I'm interested in purchasing a MacBook Air. Basically I would use it for the basic computer functions, as well as a computer to write software code. Is it possible to write programs for windows on a mac? I would use either C++, Java or Visual Basic. Thanks!
Four answers:
Craig R
2008-06-15 22:50:36 UTC
The MacBook Air is a little light-weight for programming.



The best way to write Windows code on a Mac is to run Parallels or Fusion and actually run Windows XP on the Mac. Then use Windows programming tools like Visual Studio.



It's possible to write C++ code that runs on both the Mac and Windows. You have to separate any platform dependencies into separate classes so that you can customize them for each platform, but it can be done.



You can also take the gcc compiler used on the Mac and get it for the PC. The user interface code will be different but the guts of your application should run in both places.
darkwind_duck
2008-06-15 22:20:30 UTC
Yes you can write code on a mac for windows use. The only hard part would be for troubleshooting since you cant run it on a windows machine while you code. Sometimes different machines treat the code slightly different. (for instance, unix environments tend to be more picky when it comes to capitalization in directory names) As long as you follow the standards for the language it should work fine however.



The only requirement would be that you actually compile the final code on a windows machine. (There may be some mac compilers that allow you to compile into a windows executable. I am not sure since I haven't had to do that.) Thats why when you buy software you see different boxes for mac versions and pc versions, since the final compiled exe is machine dependent.



If you want the easiest route I would go with Java. Java bytecode is independent of the machine since it isn't actually compiled. It is ran by the virtual machine that is installed on each machine instead of being an independent program. Basically it is what they call an interpretive language instead of compiled.



edit:

I don't own a mac, but from what I've read mac computers come with a JDK (java development kit - that you use for creating programs) pre installed. You would probably want to go apple's website and update to the latest version. As for writing actual code, the only thing I can say is to buy a nice beginners java book. There are tutorials online if you google, but they never quite come to the quality of a good book.

(also, css isn't actually used to create software, its used in web page development)
2008-06-15 22:09:23 UTC
Sure, but since it is a Mac, it just takes a different code. You gotta look at as another language. English vs. French, for example, but almost all PC programmer and coders do it because usually consumers want software for both computers. PC for all the basic stuff and Mac for the media.
inno
2016-10-23 06:35:09 UTC
as well to Java, take a seem at REALbasic. for sure, you requested about "good" software, and REALbasic doesn't fairly meet that requirement. this is sluggish and bloated, yet you could create flow-platform apps with it.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...