Mac Help!I'm a beginner

cassiopeiait

macrumors newbie
Original poster
May 30, 2006
10
0
fink needs help picking an alternative to satisfy a virtual dependency. The candidates:

(1) db44-aes: Berkeley DB embedded database - crypto
(2) db44: Berkeley DB embedded database - non crypto

Pick one: [1] 2
Can't resolve dependency "gcc4.0 (>= 4.0.1-1)" for package "gmp-4.2.2-1001" (no matching packages/versions found)
Exiting with failure.

Please help!!
 

Arbiter

macrumors newbie
May 23, 2006
29
0
isnt GCC allready installed? Use it thru the xterm. You can use any editor with it, but I recommend one(emacs? nedit? VI?) that supports C++ syntaxes so it is easier to indent(sp?) and read thru the source code.
 

Arbiter

macrumors newbie
May 23, 2006
29
0
Disregard xterm... I ment the OS X terminal.. it is basically the same thing but when I think xterm I think the terminal that is on linux/unix and/or X11.

The terminal is in Applications_Utilities as far as I know. From there you can compile and run your C++ program. There are a lot of GCC tutorials on the net.

Do you have any experience of terminals? How did you use DEV C++? With cygwin?

This seems to be a good terminal tutorial http://aplawrence.com/MacOSX/macosxshell.html
 

robbieduncan

Moderator emeritus
Jul 24, 2002
24,638
61
Harrogate
Execuatables on a Unix platform (like OSX) do not end in .exe You can add it but it will have no effect! The executable status of a file is controlled by the executable bit of the file permissions. From the terminal type ls -l. x indicates eXexutable.

Code compiled on OSX will not execute on Windows. This is nothing to do with .exe extension but to do with the ABI of the platform. You would need to recompile your code on Windows or use a cross compiler.
 

Eraserhead

macrumors G4
Nov 3, 2005
10,410
10,692
UK
cassiopeiait said:
OK. I'VE realized yesterday that there is no GCC in my mac.(i have the iBook at home, but I have normal PC on a work where I can use internet). now I'm downloading the Xcode 2.3 (Disk Image).
But, I wanted to know, when I program in C++ on a Mac, then i will not do .exe files at the end. What files do you get when you program on a Mac?:confused:
That means that the programs I will do, they won't be leggible in windows?
:(

thank you again! :)
Probably .app, no they won't work on Windows... If you need to create windows executables you'll need to program on a Windows PC, it might be worth asking your teacher/lecturer about it.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
24,638
61
Harrogate
Eraserhead said:
Probably .app, no they won't work on Windows... If you need to create windows executables you'll need to program on a Windows PC, it might be worth asking your teacher/lecturer about it.
.app files are actually (well 99% of the time) directories that contain lots of files. The actual executable portion of the app has no extension at all (take a look inside a .app package at Contents/MacOS/).
 

yippy

macrumors 68020
Mar 14, 2004
2,087
3
Chicago, IL
C++ programs that are coded without using any specific Mac or Windows commands (such as a gui) can be compiled on either platform. This means if you take the raw, uncompiled code and compile it on your Mac, the program created will run on Macs. If you take that same uncompiled code but compile it in Windows, it will then run in Windows.
 

MarkCollette

macrumors 68000
Mar 6, 2003
1,555
32
Toronto, Canada
If you want to learn C++, then you can make console applications on pretty much any computer with GCC, and you can just recompile them on any machine.

But, if you then want to make windows and have buttons and other graphical things, then each computing platform differs quite a bit. But, there are cross platform toolkits, like QT that will make this easier to do.