Mac Development Questions

C

CodeJunkie

Guest
I've been programming on Windows for a few years, but I'm trying to start on Mac.

Being accustomed to Windows programming, I'm confused on a few things.

On Windows, you had source files that were compiled and linked to DLLs. That created an executable file that linked to those DLLs and any files the program needed were separate from the executable. As far as I can tell, on Mac, everything required by the program is within the program's file. Is that right?

I'm not exactly sure what I'm asking because I'm so confused, but what is the equivalent of DLLs, source code, and executable files on Mac?
 
Joined
Oct 27, 2005
Messages
4,702
Reaction score
404
Points
83
I've been programming on Windows for a few years, but I'm trying to start on Mac.

Being accustomed to Windows programming, I'm confused on a few things.

On Windows, you had source files that were compiled and linked to DLLs. That created an executable file that linked to those DLLs and any files the program needed were separate from the executable. As far as I can tell, on Mac, everything required by the program is within the program's file. Is that right?

I'm not exactly sure what I'm asking because I'm so confused, but what is the equivalent of DLLs, source code, and executable files on Mac?

G'day CodeJunkie,

You're confused? I'm no developer, but I would hazard a guess that the equivalent of DLL is the plist, which is basically just a preference file and the rest is contained within the app as you stated above. The executable equivalent is a .dmg which is just a container for the application, the Source Code equivalent has got me, I will offer that this code is created using X11 which is a Graphical Interface for Unix.

I'm not trying to give you a bum steer, just trying to help out.
 
OP
C

CodeJunkie

Guest
Well, I guess there's not a Mac equivalent for source code, source code is source code. I guess I meant how it relates to everything else.

In Xcode, I'm confused about some of the terms. Like, what is the "target" and "product" and "frameworks"? I have an idea of what they all are, I just can't figure out how they're related.
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
My understanding of DLLs is that they are just libraries of sharable code than can be linked at compile time and used at run time as needed. This would be similar to the Cocoa frameworks and Unix libraries. Most of code written for the Mac doesn't actually copy those libraries to its self at compile time. If I remember correctly, the Objective-C model allows late binding, allowing for a minimal amount of required information at compile and linking time about the detail of the framework workings. Sorry to be vague, its been a long time since I looked at this.

Go to this page and download "Xcode 2 User Guide" (not the deprecated 2.0 guide listed above it) and look at page 279 about targets.

Executable files can be a single file like a .exe Windows file, or a special .app folder containing one or many programs with supporting files. Go to the Applications folder and right click on the iMovie application. Select "Show Package Contents" and investigate the folders below in the new window that appears. Just don't muck with the files because you could stop the program from working.

Notice that iMovie has its own set of custom frameworks. This could allow Apple to update just a framework for users, instead of asking them to download the whole thing. The way Apple does updates, this would of course be hidden to the user.

Go to the Apple Developer Documentation starting page to learn more. Also look at getting a free developer user name and joining the appropriate Apple mailing lists for your interests.

If you want to learn to program Cocoa applications, I suggest buying one the higher rated books found on Amazon. At minimum start here.
 
Joined
Jun 6, 2006
Messages
1,153
Reaction score
94
Points
48
Your Mac's Specs
MacBook 2.0GHz White, 512MB RAM, 60GB HDD
On Windows, you had source files that were compiled and linked to DLLs. That created an executable file that linked to those DLLs and any files the program needed were separate from the executable. As far as I can tell, on Mac, everything required by the program is within the program's file. Is that right?

I'm not exactly sure what I'm asking because I'm so confused, but what is the equivalent of DLLs, source code, and executable files on Mac?

The Unix equivelant of a DLL is a Shared Object file, with an extension of either .so or .dylib. I think your confusion comes from Application Bundles. These are directories that contain, among other things, the executable file(s), shared libraries required by the application and other resources. However, if you look at these Bundles with Terminal rather than Finder, you'll see that they are just directories with all the normal files within them. Executables and dynamic linking works just the same as it does on Windows.

Also, p-list files are more akin to the Windows registry, as they contain hierarchies of key/value pairs just like the registry, but with separate files for each thing that needs one.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top