From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,691c1078cd009a0f X-Google-Attributes: gid103376,public From: Ashley King Subject: Re: Calling C from Ada - link problem Date: 2000/03/10 Message-ID: <8aao8n$94m$1@nnrp1.deja.com>#1/1 X-Deja-AN: 595651377 References: <8a803u$906$1@nnrp1.deja.com> <38C7E615.A011C7FE@averstar.com> X-Http-Proxy: 1.0 x34.deja.com:80 (Squid/1.1.22) for client 193.192.234.4 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Fri Mar 10 12:02:32 2000 GMT X-MyDeja-Info: XMYDJUIDashleyking Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT) Date: 2000-03-10T00:00:00+00:00 List-Id: In article <38C7E615.A011C7FE@averstar.com>, Tucker Taft wrote: > ObjectAda has a number of conventions other than simply "C" which > allow you to be more specific about the calling convention and/or > specify whether you are exporting/importing as part of a DLL. > You might want to consult that part of the ObjectAda documentation > that explains the options available for the "convention" argument to > pragma Import. Thanks, I did. I tried putting DLL in place of C in the import command, and that made no difference. Another attempt: I created a new c++ project where I said I wanted to have a static library rather than a DLL, and removed the dllexport bit from the C code. It linked in the static library successfully, but complained that it couldn't find some other library. After putting the path to that library in the project settings, I now get the same lnk1136 error but this time on a Microsoft Visual Studio vc98 library called mapi.lib. I again tried copying the files that Rush Kester had suggested, and got the same result as before. I even tried making the function a procedure and the return type of the C code void. No change. Perhaps the versions of ObjectAda and Visual C++ that I am using are incompatible in some way. Robert Dewar said that he had built successfully on his setup, so it's possible that specifying C rather than DLL makes no real difference in this example and I have just missed something from the Ada project settings. Regards, Ashley -- Email won't work. Read here, post here. Sent via Deja.com http://www.deja.com/ Before you buy.