Email:   


Home
In This Issue
Email a Friend
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.


Coding Domino server tasks in C: beyond Windows (continued)

There's a useful list of functions that require special coding for non-Intel platforms in the API Toolkit, so if you want to use some of the more esoteric function calls, it's worth checking the documentation first to see if any changes are required.

Penguin time
So now we can recompile ACLHelp onto Linux. Although there are C and C++ IDEs (Integrated Drive Electronics) on Linux, such as KDevelop, I haven't gone beyond the command line programming tools yet. There's no reason why you shouldn't use KDevelop to compile and debug ACLHelp, but because we're pretty sure we have most of the bugs fixed under Windows, we'll leave KDevelop to another day.

Makefiles can be pretty intimidating, but Lotus does supply examples in the toolkit for each platform. I recommend you copy them. If you're using the R4.6x versions of the toolkit, there won't be any Linux support, as there wasn't a Domino 4.6x server for Linux. Just download the R5 API Toolkit and get a Linux makefile out of there. I usually start with a makefile from samples\server\addin, as it's the same type of program as ACLHelp. You'll need to change the name of the program to aclhelp, the source file to main.c, and the header file to aclhelp.h in the includes section, but otherwise use it as it is.

Now, I'm assuming you already have your Domino server working on Linux. If not, stop now and do that first. There were some excellent articles on setting up Domino on Linux in DominoPower in October and September 2000, so read them again. They're at http://www.dominopower.com/issues/issue200009/linux0900001.html and http://www.dominopower.com/issues/issue200010/linux1000001.html. There are also some pages at http://www.bluesky.co.uk/sites/jamespeel that should help you on your way.

I'm also assuming you have the Lotus C API Toolkit for Linux installed. Unlike Windows, it matters where in the file system the server and toolkit are installed. The Domino server program directory can be found at /opt/lotus/notes/latest/linux, and the C API Toolkit must be located at /opt/lotus/notesapi for the programs to compile. If you must put the files anywhere else, you can create UNIX symbolic links to make the system think everything is installed in these directories.

To compile under Linux, you'll need the main.c, aclhelp.h and linux.mak files. On the command line, before you start, you need to define some environment variables like this:

export LOTUS=/opt/lotus
export Notes_ExecDirectory=$LOTUS/notes/latest/linux
export PATH=$PATH:$Notes_ExecDirectory

You can see if it all worked by typing echo $PATH. The output from this command should prove the PATH variable has the Domino program directory appended to it. Now type:

make -f linux.mak

Your program should compile. You now have an aclhelp file that you must copy to the Domino program directory and make sure the ownership (using chown) is the same as other programs like replica. And voila! You've ported to Linux.




[ Prev | Next ]

-- Advertisement --

2-Minute Tutorials
How do I...

  • integrate MS Office or OpenOffice with Notes?
  • create cross-tab reports and charts?
  • print serial letters and mailing labels?
  • create PDFs in Lotus Notes?


Check out the 2-minute tutorials here.
-- Advertisement --

Six Great Tools for IBM Lotus Sametime
  • Encrypted and secure, browser-based, persistent chat rooms
  • Complete chat logging and auditing
  • Easy-to-define IM help desk queues
  • Manage buddy lists across any organization
  • Integrate awareness into Microsoft Outlook
  • High powered, rapid bot development tools


Visit Instant Tech for free trials and more information.
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.