Skip site navigation (1) Skip section navigation (2)

Re: Build failure on OSX (Solved)

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
Cc: openmacnews(at)gmail(dot)com, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Build failure on OSX (Solved)
Date: 2006-04-23 19:19:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers
Florian G. Pflug wrote:
> OpenMacNews wrote:
>> Hash: RIPEMD160
>>> I'm getting linker error on OSX since about two days. Any idea why the
>>> symbol __ftol is missing,
>>> and which library should provide it?
>> ...
>>> /Users/pgadmin3/Installs/PostgreSQL/8.1.3/lib/libpq.a   -lssl -lcrypto
>>> ld: Undefined symbols:
>>> __ftol
>> ...

I found the error. misc.cpp defines _ftol or _ftol2 as "extern". Whoever
added that code seems to have believed that "#if (_MSC_VER < 1300)" will
evaluate to false if _MSC_VER is not defined ;-) It doesn't, howerver,
so this needs wrapping inside "#ifdef WIN32".

Heres a patch, please apply.

Index: src/utils/misc.cpp
--- src/utils/misc.cpp  (revision 5084)
+++ src/utils/misc.cpp  (working copy)
@@ -428,9 +428,10 @@

+#ifdef WIN32
  #if (_MSC_VER < 1300)
  /* _ftol2 is more than VC7. */
  extern "C" long _ftol( double );
  extern "C" long _ftol2( double dblSource ) { return _ftol( dblSource ); }

mfg, Florian Pflug

In response to

pgadmin-hackers by date

Next:From: svnDate: 2006-04-23 20:03:34
Subject: SVN Commit by dpage: r5085 - trunk/pgadmin3/src/utils
Previous:From: Florian G. PflugDate: 2006-04-23 18:31:17
Subject: Re: Build failure on OSX

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group