They said the Lotus C API for Mac OS X wouldn’t come, and I said it is “Hard to believe”. It came. notesapimacosx I’ve got a sample program compiled and linked, and I’m now fumbling with getting it to run. Not easy, but I’ll perservere. If you take the time to read the Building UNIX and MAC Applications in the User’s Guide (I recommend you don’t) you’ll see, among a lot of other stuff, the following:

  • Set the environment variable LOTUS to the canonical Lotus directory, /opt/lotus (for all platforms other than z/OS) or /usr/lpp/lotus (for z/OS), if necessary. All Lotus software is installed in the canonical Lotus directory.
  • Set the environment variable PATH to include the Domino executable directory, the Domino data directory and the Domino resource directory.

One word? Bullshit. None of that corresponds to what you’ll see on Mac OS X, because the installer doesn’t create a /opt/lotus. Nor has anyone ever heard of putting data onto $PATH! The way it is done, is to have the following in your environment for building programs:

    export Notes_ExecDirectory="/Applications/"
    export LOTUS="/Users/jpm/tmp/"
    make -f macosx.mak

where $LOTUS points to the directory in which you have the notesapi directory. For running the executables, you need:

    export Notes_ExecDirectory="/Applications/"
    export DYLD_LIBRARY_PATH=${Notes_ExecDirectory}

I was then able to launch the rsimple program. Oh, and by the way IBM/Lotus: this took me so long, because I had a slash at the end of the content of $Notes_ExecDirectory (as in .../MacOS/), because UNIX has never had a problem with multiple slashes in a path name: the open() system call ignores empty paths. For example:

    $ cat /etc///////passwd

is fully legal. Why don’t you allow it? :-(

DomiNotes, C, lotus, and API :: 03 Sep 2009 :: e-mail