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 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: Rush Kester Subject: Re: Calling C from Ada - link problem Date: 2000/03/09 Message-ID: <38C7E832.F5A265BB@jhuapl.edu>#1/1 X-Deja-AN: 595190822 Content-Transfer-Encoding: 7bit References: <8a803u$906$1@nnrp1.deja.com> To: Ashley King X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@houston.jhuapl.edu X-Trace: houston.jhuapl.edu 952614402 28135 128.244.45.70 (9 Mar 2000 15:06:42 GMT) Organization: AdaSoft at Johns Hopkins Univ/ Applied Physics Lab Mime-Version: 1.0 NNTP-Posting-Date: 9 Mar 2000 15:06:42 GMT Newsgroups: comp.lang.ada Date: 2000-03-09T15:06:42+00:00 List-Id: You should try saving ObjectAda's LINK.EXE, CVPACK.EXE & CVTRES.EXE and replacing them with the same programs from Visual C then relinking. P.S. Subscribing to and posting this on intel-objectada@aonix.com would better target people who could answer ObjectAda specific questions and you will find it very useful. I believe you can also check the email archives using a web browse, see http://www.aonix.com/content/support/ada/mail_lists/lists-index.html Rush Kester Software Systems Engineer AdaSoft at Johns Hopkins Applied Physics Lab. email: rush.kester@jhuapl.edu phone: (240) 228-3030 (live M-F 9:30am-4:30pm, voicemail anytime) fax: (240) 228-6779 http://hometown.aol.com/rwkester/myhomepage/index.html ------------------------------------- Ashley King wrote: > Hello everybody. I hope someone can help me. > > I am trying to call a C function from Ada. I am using ObjectAda 7.1.1 > and MS Visual C++ 6. Everything compiles. When I try to link on the Ada > side, I get the following error: > > whatever.lib: fatal error LNK1106: invalid file or disk full: cannot > seek to 0x... > > My disk is definitely not full, and I have looked through past Usenet > messages using Deja and none of the other suggestions or comments that I > saw have made any difference. > > The C project was created as a Win32 Dynamic-Link Library, and the build > produces .DLL, .EXP and .LIB files plus some others. I have put the path > that contains these files into the ObjectAda Project Settings under > Search links of type Normal. > > The Ada code I am using is, essentially: > > WITH INTERFACES.C ; > ... > FUNCTION whatever RETURN INTERFACES.C.INT ; > PRAGMA IMPORT ( C, whatever, "whatever" ) ; > > The C code I am using is, in full: > > whatever.h: > > #ifdef __cplusplus > extern "C" { > #endif > __declspec(dllexport) int whatever(); > #ifdef __cplusplus > } > #endif > > whatever.cpp: > > #include "whatever.h" > int whatever() > { > return 12345; > } > > Thanks for any help. > > Regards, > Ashley > > -- > Email won't work. Read here, post here. > > Sent via Deja.com http://www.deja.com/ > Before you buy.