comp.lang.ada
 help / color / mirror / Atom feed
* Calling C from Ada - link problem
@ 2000-03-09  0:00 Ashley King
  2000-03-09  0:00 ` Tucker Taft
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Ashley King @ 2000-03-09  0:00 UTC (permalink / raw)


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.




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2000-03-11  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-09  0:00 Calling C from Ada - link problem Ashley King
2000-03-09  0:00 ` Tucker Taft
2000-03-10  0:00   ` Ashley King
2000-03-09  0:00 ` Robert Dewar
2000-03-09  0:00   ` Larry Kilgallen
2000-03-09  0:00 ` Mike Dimmick
2000-03-10  0:00   ` Ashley King
2000-03-11  0:00     ` David Botton
2000-03-09  0:00 ` Rush Kester
2000-03-10  0:00   ` Ashley King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox