Linking C with Clipper

Linking C with Clipper

Post by Tanu Kartawir » Sat, 04 Jul 1992 17:05:34



 Thanks to all who responded. I really appreciate it.

 > If the C function you are trying to link is relatively short,
 > perhaps you could post it for a little more concrete discussion.

 Here's is a sample of the code that I'm trying to linked together. This
 is a much samplified code of what I'm trying to do. I was finally able
 to link it successfuly (Thanks to Mark). But, the EXE file still doesn't run
 correctly, if it runs at all.  (At least I got something :->)

 --- CLIPTEST.PRG ------------------

 ? "Test"
 a = "123"
 b = the_mem()
 ? a, b
 return

 ---- CTEST.C ------------------------

 #include "d:nandef.h"
 #include "d:extend.h"
 #include <dos.h>

 CLIPPER the_mem()
 {
 union REGS r;
 int amem;

         int86(0x12, &r, &r);
         amem=r.x.ax;
         printf("Result:%d\n",amem);
         _retni(amem);
 }

 ----------------------------------
 Here's how I compile and linked it: Notes that I'm using TurboC v.2.0
 and Clipper Summer 87.

 tcc -c -f- -ml -N- ctest.c
 clipper cliptest.prg -l -m
 tlink ctest.obj cliptest.obj,,,clipper+extend+cl.lib

 It did compile and linked fine, but the program either doesn't work,
 prints wrong results, and/or prints garbage and runtime error message.
 What gives?

 Thanks again,
 Regards,

 --
 -tanu-

 CSULB LIB LAB
   --
   -tanu-

   CSULB LIB LAB
--
-tanu-

CSULB LIB LAB

 
 
 

1. !Help needed linking to Clipper-indexed DBase tables

I'm trying to link a D3 app to a set of large DBase tables which make use
of Clipper indices.  

However whichever driver I use to access the tables (either the BDE
standard (DBASE) driver or the ODBC Microsoft dBase Driver), the results
are sooo sloooooow that ordinary frequent use is totally unfeasible.

Does anyone know of a DBase driver that can handle Clipper indices?

2. IL-Illinois-94072--MS SQL Server-ORACLE-Informix-Database Design Consultant

3. help linking C & Clipper

4. SQL Server BUG ... or not!?

5. Bitmap indexes?

6. Broken pipes

7. Linking Clipper & C

8. Clipper/FoxPro links to Oracle

9. LINK CLIPPER TO C FUNCTIO

10. BITON library - Clipper to Oracle link

11. Linking Clipper with C