Re: [Dev-C++] compiling lotus notes c api programms with dev c++. is it possible?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Yeoh H. <ye...@ye...> - 2003-06-13 08:19:03
|
----- Original Message ----- From: "Thomas Stoehr" <tho...@vo...> To: <dev...@li...> Sent: Friday, June 13, 2003 3:32 PM Subject: [Dev-C++] compiling lotus notes c api programms with dev c++. is it possible? > hi list, > > has somebody experience with compiling lotus notes c api programms under dev > c++? > i have tried to configure the compiler ( /DNT switch) but it always says : > In Dev-C++, your compiler switch for this define should be -DNT. I haven't had the chance to use the Lotus Notes C API but AFAIK, here's an extract: <extract> Most Lotus C API functions for Domino and Notes use the __stdcall calling convention, just as the Windows API does. A few functions require a variable number of parameters; these functions use the cdecl calling convention. Under normal circumstances, specifying the appropriate calling convention is handled by the C API header files. </extract> So you'll need to create the .a files. Here's an extract from MinGW FAQ: <extract> However, for __stdcall functions, the above method does not work. For MSVC will prefix an underscore to __stdcall functions while MinGW will not. The right way is to produce the DEF file using the pexports tool included in the mingw-utils package and filter off the first underscore by sed: pexports testdll.dll | sed "s/^_//" > testdll.def Then, when using dlltool to produce the import library, add `-U' to the command line: dlltool -U -d testdll.def -l libtestdll.a And now, you can proceed in the usual way: gcc -o testmain testmain.c -L. -ltestdll </extract> Regards, Yeoh ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ ICT eBooks by Yeoh HS Free Downloads at http://www.yeohhs.com ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ |