Lotus C API example in Microsoft Visiual C++ Express
I have downloaded the Lotus C API Toolkit for Notes and Domino 8.5.2. On a Window7 64 bit pc I have installed the toolkit and Microsoft Visiual C++ Express.
When I try to run the example allflds.c I get these errors:
1>------ Build started: Project: test2, Configuration: Debug Win32 ------
1>allflds.obj : error LNK2005: _main already defined in notes0.obj 1>notesai0.obj : error LNK2019: unresolved external symbol _AddInMain@12 referenced in function _NotesMain@8 1>c:\users\zzz\documents\visual studio 2010\Projects\test2\Debug\test2.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========I have never worked with the Lotus C API before, pointers in the right direction w开发者_Python百科ould be appreciated.
I figured it out. I followed the settings mentioned in this document DominoDefrag. Renaming
int main(int argc, char *argv[])
to
STATUS LNPUBLIC AddInMain(HMODULE hModule, int argc, char *argv[])
did the trick.
精彩评论