As you may recall, I have a large C++ application which calls a smallish library written in Pascal. I have compiled and linked that library as a universal binary which is intended to run under Mac OS X 10.3 and up on PowerPC, and Mac OS X 10.4 and up under i386. I had been running the application on Mac OS X 10.4 and up only, but have been going through the trouble of extending support to 10.3. But there is a symbol, apparently referenced from my Pascal library, which is missing. ___powidf2. I think this might be a math function of the form: float = pow(float, int); but am not sure. I've linked in libgpc, libgcc, and the darwin-fpsave libraries.
Does anyone know how I should go about getting this to link? Googling and searching on this mailing list have not gotten be anywhere.
--glenn
Glenn Howes wrote:
As you may recall, I have a large C++ application which calls a smallish library written in Pascal. I have compiled and linked that library as a universal binary which is intended to run under Mac OS X 10.3 and up on PowerPC, and Mac OS X 10.4 and up under i386. I had been running the application on Mac OS X 10.4 and up only, but have been going through the trouble of extending support to 10.3. But there is a symbol, apparently referenced from my Pascal library, which is missing. ___powidf2. I think this might be a math function of the form: float = pow(float, int); but am not sure. I've linked in libgpc, libgcc, and the darwin-fpsave libraries.
Does anyone know how I should go about getting this to link? Googling and searching on this mailing list have not gotten be anywhere.
AFAICS ___powidf2 is a function in libgcc. It looks that the function was introduced in gcc-4.0 (I do not see it in gcc-3.4.6). My guess would be that you have linked in statically something that uses this function (possibly via C header file), but you probably use shared libgcc.
I would first try to compile and link everything on the oldest system that you want to support (library compiled on newer system is likely to depend on functions present only on newer system).
Waldek Hebisch wrote:
Glenn Howes wrote:
As you may recall, I have a large C++ application which calls a smallish library written in Pascal. I have compiled and linked that library as a universal binary which is intended to run under Mac OS X 10.3 and up on PowerPC, and Mac OS X 10.4 and up under i386. I had been running the application on Mac OS X 10.4 and up only, but have been going through the trouble of extending support to 10.3. But there is a symbol, apparently referenced from my Pascal library, which is missing. ___powidf2. I think this might be a math function of the form: float = pow(float, int); but am not sure. I've linked in libgpc, libgcc, and the darwin-fpsave libraries.
Does anyone know how I should go about getting this to link? Googling and searching on this mailing list have not gotten be anywhere.
AFAICS ___powidf2 is a function in libgcc. It looks that the function was introduced in gcc-4.0 (I do not see it in gcc-3.4.6). My guess would be that you have linked in statically something that uses this function (possibly via C header file), but you probably use shared libgcc.
I would first try to compile and link everything on the oldest system that you want to support (library compiled on newer system is likely to depend on functions present only on newer system).
Yes, with the Apple hacked gcc and g++ compilers, you are linking to a shared libgcc in /usr/lib or /Developer/SDKs/MacOSX10....sdk/usr/lib. Did you set the Mac OS X 10.3 SDK prefix ? There may be an incompatibility with the static libgcc that comes with gpc. You can look for symbols and symbol dependencies in the various libraries with the "nm" utility. Type "man nm" for help. To can also try to build on Mac OS X 10.3 (see the compiler sources and scripts on my website). Let us know the result.
Regards,
Adriaan van Os