Friday, November 17, 2006

How to compile NotesAPI programs without buying visual studio on Windows XP

Download and install:
1. Microsoft Visual C++ Express (GUI not needed to compile)
http://msdn.microsoft.com/vstudio/express/visualc/
2. Run Windows Update if needed

3. Microsoft Platform SDK for Windows Server 2003
http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&DisplayLang=en#filelist

4. Download and extract the Lotus C API Toolkit
http://www-128.ibm.com/developerworks/lotus/downloads/toolkits.html

5. Download the nmake program and copy this to your c++ bin directory
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084
(may already come with c++ express)

6. Create batch files that simplify your build (put these in a directory in your path)

FILE: mk.bat
CONTENTS:
nmake /f mswin32.mak /a

FILE: setenv.bat
CONTENTS:
"D:\Program Files\Microsoft Visual Studio 8\VC\vcvars32.bat"
"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.bat"
set LIB=d:\notesapi\lib\mswin32;%LIB%
set INCLUDE=d:\notesapi\include;%INCLUDE%
set PATH=d:\lotus\domino;%PATH%

FILE: w32.bat
CONTENTS:
"D:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd" /RETAIL

7. To use the compiler
1. Start a Visual Studio 2005 Command Prompt
2. Run the commands:
a) setenv
b) w32
3. Change to the d:\notesapi\samples\basic\intro
4. run the batch file "mk"

...and you should then be able to compile NotesAPI programs.

1 comment:

Anonymous said...

Hey Ian,

I found this article on how to compile an Notes application with Eclipse 3.2 : http://smoki.atblogs.de/index.php?op=ViewArticle&articleId=1309&blogId=82