From: | "Ale Raza" <araza(at)esri(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Link error: LNK2019: unresolved external symbol _pg_detoast_datum |
Date: | 2006-10-18 22:28:59 |
Message-ID: | 7CAD6D9B7D16BC4A88795771E486508203892EF3@pianowire.esri.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I want to add a user defined function using "Version-1 Calling
Conventions" but getting a link error.
I am using MS Visual C++ .NET (V 7.1.3) on Win XP SP 2. PostgreSQL
8.1.3.
Am I missing some lib or some other file?
I saw earlier thread "building and linking C user defined functions" and
set the complier setting to /FORCE. It create the dll but the following
SQL crash psql
Select filesize('my file');
Here is the simplified version of my problem.
ERROR:
------ Rebuild All started: Project: copytext, Configuration: Debug
Win32 ------
Deleting intermediate files and output files for project 'copytext',
configuration 'Debug|Win32'.
Compiling...
copytext.c
Linking...
Creating library Debug/copytext.lib and object Debug/copytext.exp
copytext.obj : error LNK2019: unresolved external symbol
_MemoryContextAlloc referenced in function _copytext
copytext.obj : error LNK2001: unresolved external symbol
__imp__CurrentMemoryContext
copytext.obj : error LNK2019: unresolved external symbol
_pg_detoast_datum referenced in function _copytext
Debug/copytext.dll : fatal error LNK1120: 3 unresolved externals
Build log was saved at "file://..\copytext\Debug\BuildLog.htm"
copytext - 4 error(s), 0 warning(s)
File copytext.c:
#include "postgres.h"
#include <string.h>
#include "fmgr.h"
PG_FUNCTION_INFO_V1(copytext);
Datum
copytext(PG_FUNCTION_ARGS)
{
text *t = PG_GETARG_TEXT_P(0);
/*
.........
PG_RETURN_TEXT_P(new_t);
}
I can do this on Linux but looks like windows have some issues.
Thanks.
Ale Raza.
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Johnson | 2006-10-18 22:42:22 | Re: Real time query analyzer |
Previous Message | Jim C. Nasby | 2006-10-18 22:22:58 | Re: Real time query analyzer |