Florian G. Pflug wrote:
OpenMacNews wrote:
-----BEGIN PGP SIGNED MESSAGE-----
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 @@
}
#endif
+#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 ); }
#endif
-
+#endif
mfg, Florian Pflug
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings