[postgis-users] writing function using C

eehab hamzeh eehab40 at hotmail.com
Wed Mar 11 04:15:34 PDT 2009



Dear  all,







I try to compile the code below to  dynamic library, the  problem if i
declare the variable type to anything else int32, i recieve the error
as  below, any body have experience in writing functions using c



i use VC++ 6.



Kind regards



ihab





extern "C" {

Datum add_one(PG_FUNCTION_ARGS) {

    float8 arg = PG_GETARG_FLOAT8(0);

 float8 arg1 = PG_GETARG_FLOAT8(1);



    PG_RETURN_FLOAT8(arg + arg1);

}











--------------------Configuration: eehab - Win32 Release--------------------

Linking...

   Creating library Release/eehab.lib and object Release/eehab.exp

eehab.obj : error LNK2001: unresolved external symbol _Float8GetDatum

Release/eehab.dll : fatal error LNK1120: 1 unresolved externals

Error executing link.exe.



eehab.dll - 2 error(s), 0 warning(s)
_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090311/fd2bbf3c/attachment.html>


More information about the postgis-users mailing list