Writing programs for a mac

  • Thread starter daniel_i_l
  • Start date
  • #1
daniel_i_l
Gold Member
867
0

Main Question or Discussion Point

I use linux on a pc and one of my friends who uses a mac wants me to write a small app for him. It doesn't need any GUI of anything, just a few lines in C++ with a bitmap image for input and an output to a text file.
Is there a way for me to compile it in linux so that he'll be able to use it with his mac? He isn't very computer literate so I don't want him to have to do a lot of tweaking.
Thanks.
 

Answers and Replies

  • #2
chroot
Staff Emeritus
Science Advisor
Gold Member
10,226
34
In general, you cannot compile it on a Linux machine and then run it on a Mac. The Mac should already have the GNU compiler collection installed on it, though, so you should be able to compile it on the Mac with the same commands you would use on the Linux box.

- Warren
 
  • #3
1,482
3
If you compile using gcc on the linux box, should it not work on unix since the two are similar?

I remember running a small program on Solaris that was compiled in ubuntu.
 
  • #5
MATLABdude
Science Advisor
1,655
4
XCode is Apple's Development Suite (free through Apple Developer, and I think it's still included--but not installed--on the OS X DVD, up to Leopard, OS X 10.5)
http://en.wikipedia.org/wiki/Xcode
http://developer.apple.com/TOOLS/Xcode/

I think (but am not positive) that it includes GCC, and a whole lot of other things. However, it should be able to compile your (very basic, and non-system specific) C++ code to at least a terminal program. Barring that, there're Widgets like QT, wxWidgets, and GTK+ which would allow you to develop cross-platform (to a point) GUI programs.
 

Related Threads on Writing programs for a mac

  • Last Post
Replies
8
Views
3K
  • Last Post
Replies
11
Views
7K
Replies
8
Views
7K
  • Last Post
Replies
5
Views
602
Replies
4
Views
4K
  • Last Post
Replies
3
Views
723
Replies
4
Views
13K
Replies
18
Views
6K
Replies
4
Views
1K
Replies
6
Views
4K
Top