problem with MyBackendId

View: New views
3 Messages — Rating Filter:   Alert me  

problem with MyBackendId

by Andreas 'ads' Scherbaum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello,

i successfully installed PostgreSQL 8.0.3 and MingW on a windows xp box
and tried to compile a module of mine. Thats the error i got back:

$ make
sed 's,MODULE_PATHNAME,$libdir/tablelog,g' tablelog.sql.in >tablelog.sql
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wold-style-definition -Wendif-labels -fno-strict-aliasing  -I. -I../../src/include -I./src/include/port/win32 -DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o tablelog.o tablelog.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wold-style-definition -Wendif-labels -fno-strict-aliasing  -I. -I../../src/include -I./src/include/port/win32 -DEXEC_BACKEND  "-I../../src/include/port/win32"  -c -o tablelog_restore.o tablelog_restore.c
dlltool --export-all  --output-def tablelog.def tablelog.o tablelog_restore.o
dllwrap  -o libtablelog.dll --dllname libtablelog.dll  --def tablelog.def tablelog.o tablelog_restore.o -L../../src/port -L../../src/backend -lpostgres
Info: resolving _MyBackendId by linking to __imp__MyBackendId (auto-import)
fu000001.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
nmth000000.o(.idata$4+0x0): undefined reference to `_nm__MyBackendId'
collect2: ld returned 1 exit status
c:\mingw\bin\dllwrap.exe: c:\mingw\bin\gcc exited with status 1
make: *** [libtablelog.a] Error 1

He seems to be able to resolv MyBackendId, but thats all.
Has anybody an idea what is missing or wrong?
Thanks in advance.


Kind regards

--
                                Andreas 'ads' Scherbaum
Failure is not an option. It comes bundled with your Microsoft product.
 (Ferenc Mantfeld)

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Re: problem with MyBackendId

by Tom Lane-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Andreas 'ads' Scherbaum" <adsmail@...> writes:
> i successfully installed PostgreSQL 8.0.3 and MingW on a windows xp box
> and tried to compile a module of mine. Thats the error i got back:

> nmth000000.o(.idata$4+0x0): undefined reference to `_nm__MyBackendId'

MyBackendId isn't DLLIMPORT'ed.  I believe you can hack around this by
doing

extern DLLIMPORT BackendId MyBackendId;

in your own code.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Re: problem with MyBackendId

by Andreas 'ads' Scherbaum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 02 Aug 2005 18:33:54 -0400
Tom Lane <tgl@...> wrote:

> "Andreas 'ads' Scherbaum" <adsmail@...> writes:
> > i successfully installed PostgreSQL 8.0.3 and MingW on a windows xp box
> > and tried to compile a module of mine. Thats the error i got back:
>
> > nmth000000.o(.idata$4+0x0): undefined reference to `_nm__MyBackendId'
>
> MyBackendId isn't DLLIMPORT'ed.  I believe you can hack around this by
> doing
>
> extern DLLIMPORT BackendId MyBackendId;
>
> in your own code.

this works.

Thanks for the tip.


Kind regards

--
                                Andreas 'ads' Scherbaum
Failure is not an option. It comes bundled with your Microsoft product.
 (Ferenc Mantfeld)

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq