New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Mac Development Questions


Post Reply New Thread Subscribe

 
Thread Tools
CodeJunkie
Guest
 
Posts: n/a

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?
QUOTE Thanks
NanoBite

 
Member Since: Oct 27, 2005
Posts: 4,714
NanoBite is an unknown at this point

NanoBite is offline
Quote:
Originally Posted by CodeJunkie View Post
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.
QUOTE Thanks
CodeJunkie
Guest
 
Posts: n/a

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.
QUOTE Thanks
NanoBite

 
Member Since: Oct 27, 2005
Posts: 4,714
NanoBite is an unknown at this point

NanoBite is offline
I just found this:

http://developer.apple.com/documenta...section_2.html

and this:

http://developer.apple.com/documenta...section_1.html

and finally this (no offence intended):

http://www.c-for-dummies.com/source.code/
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
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.
QUOTE Thanks
cazabam

 
cazabam's Avatar
 
Member Since: Jun 06, 2006
Posts: 1,153
cazabam is a glorious beacon of lightcazabam is a glorious beacon of lightcazabam is a glorious beacon of lightcazabam is a glorious beacon of lightcazabam is a glorious beacon of lightcazabam is a glorious beacon of light
Mac Specs: MacBook 2.0GHz White, 512MB RAM, 60GB HDD

cazabam is offline
Quote:
Originally Posted by CodeJunkie View Post
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.
QUOTE Thanks

Post Reply New Thread Subscribe


« Terminal - always on top? | Eclipse: "qmake not found" »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Upgrade/buy new/sell old Mac questions: Dennis.G Apple Desktops 3 08-06-2006 11:06 PM
New member, New mac user, many questions sleeperz321 Apple Notebooks 10 06-06-2006 02:07 PM
Something like terminal services for Mac plus other questions.. edokid Apple Notebooks 0 01-09-2006 08:24 PM
A few (probably dumb) questions from a new Mac user cindy Switcher Hangout 8 05-16-2005 08:51 AM
mac mini install questions Hanyoung Apple Desktops 3 01-25-2005 09:53 PM

All times are GMT -4. The time now is 10:06 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?