Clipper/C Problem

Dave.Grimmer@Dayton.NCR.COM dgrimmer at ciss.Dayton.NCR.COM
Tue Dec 18 01:55:31 AEST 1990


I am using Clipper 87 and MS C 5.10 to try to do some trig functions.
The programs and command lines used to link them are shown below.  
Basically, the problem is that I get an unresolved external refference
to "_cos" in a program that try to do a cosine function.  I probably 
have missed something simple.  If you have any experience interfacing
Clipper and MS C, please look at this simple problem and let me know
what I have missed.  Any help would be appreciated...
--
Dave Grimmer  NCR Corporate Information Resource Planning (PCD 6)
Dave.Grimmer at Dayton.NCR.COM


TEST.PRG
--------
clear
? "The cos of 30 degrees is: "+str(djgcos(30))



DJGCOS.C
--------
/* Return cos of angle passed in degrees */
#include <extend.h>
#include <nandef.h>
#include <math.h>

CLIPPER djgcos()
{
   double i;
   i=_parnd(1);
   _retnd(cos(i / 57.29578));
}


COMPILE CLIPPER PROGRAM WITH:
-----------------------------
clipper test -m


COMPILE MS C 5.10 PROGRAM WITH:
-------------------------------
CL -c -AL -Zl /Oalt /FPa /Gs djgcos.c



LINK WITH MS LINK 3.65
----------------------
link /NOE test.obj djgcos.obj ,,, \clipper\clipper



RESULTS:
-------
LINK : error L2029: Unresolved externals:

_cos in file(s):
 DJGCOS.OBJ(djgcos.c)

There was 1 error detected

-- 
Dave Grimmer  NCR Corporate Information Resource Planning (PCD 6)
Dave.Grimmer at Dayton.NCR.COM



More information about the Comp.lang.c mailing list