where to look...

Discussion in 'Mac Programming' started by dale.albiston, Oct 4, 2006.

  1. dale.albiston macrumors member

    Joined:
    Sep 29, 2006
    #1
    I have, or will have, a small problem. as part of a move towards the mac i'll be porting a small unfinished application to OSX from windows. ok its a re-write from vb into probably something else. probably c++ (so its portable enough i don't have to do this again).

    under windows I make extensive use of .dll files to allow a 'plugin' capacity to be added to my little program.

    I don't *need* the plugins, it can all be coded directly, but plugins make expansions *very* easy to add as well as making the program more useful.

    I'm not asking here for 'how do I do this', i'll try to work that out myself, the question is:

    what does OSX call what in the windows world are '.dll' files? and what is the technology used to load/call functions within them? essentially so i can go and google till I explode.
     
  2. iSee macrumors 68040

    iSee

    Joined:
    Oct 25, 2004
    #2
    "Dynamic Shared Libraries" or just "Shared Libraries"

    This link has a bunch of overview info on programming for OS X:
    http://www.kernelthread.com/mac/osx/programming.html

    It is slightly skewed to 'nix programmers moving to OS X, but is very useful, anyway (I don't come from a 'nix backgroun and I found it helpful, anyway :) ).
     
  3. dale.albiston thread starter macrumors member

    Joined:
    Sep 29, 2006
    #3
    excellent thank you.
     
  4. Krevnik macrumors 68030

    Krevnik

    Joined:
    Sep 8, 2003
    #4
    Another thing I would like to point out is that OS X has a few different ways of accomplishing what you want to do, depending on what your intent actually is.

    DLLs on Windows are a mess (I know, I write em. :/), Anything that is executable (and some things that aren't), but isn't a full application, is a DLL... ew.

    On OS X, if you want libraries, you have Frameworks which are mostly used for libraries (they are really just a bundled shared library with the headers and versioning included in the bundle, to make the Unix guys happy).

    If you want plug-ins, you have Bundles. These tend to lean towards code fragments that are meant to be loaded on-the-fly and conform to a particular interface. Apple actually uses a variant of COM for plug-in bundles written in C/C++, so it might be an easier path if you want to keep your app on Windows as well.

    EDIT: Looks like the link covers this distinction... whoops. ;)
     

Share This Page