OK, turns out this was an issue with the C++ Standard Library and dialect that 
were used.

In the Xcode project created by CMake, the issue is as follows:

PoDoFo is meant to be built using the libstdc++ library and the c++98 dialect; 
this is even explicitly defined in Xcode’s "User-Defined Settings" 
CLANG_CXX_LANGUAGE_STANDARD and CLANG_CXX_LIBRARY. However, at the same time, 
Xcode’s "Apple LLVM 5.1 - Language - C++" settings of these two values are set 
to "Compiler Default".

Now, in earlier versions of Xcode, "Compiler Default" meant exactly the 
libstdc++ library and the c++98 dialect, and according to Xcode’s Quick Help, 
it still does. But in fact, meanwhile it obviously does NOT (as of Xcode 5.1 
(5B130a)).

As a result, there are two contradicting settings for the C++ library and 
dialect in the Xcode project, and the problems I encountered are the result. 
Setting Xcode’s "Apple LLVM 5.1 - Language - C++" parameters explicitly to 
libstdc++ and c++98 fixes the issue. (I guess CMake can and should be adapted 
accordingly, but I understand too little of CMake to do this myself.)

BTW, the same issue occurs when using Unix Makefiles in OS X 10.9 Mavericks. 
But I didn’t investigate the parameters I would have to change there, and used 
Xcode instead.

A final remark: if you have the bad luck that this issue also affects those 
libraries required by PoDoFo that use C++ themselves (probably only CppUnit?), 
then of course the new settings will make Xcode fail when linking to these 
libraries. The solution would be to make sure that these libraries are also 
built using libstdc++ and c++98. (In fact, CppUnit didn’t work for me because 
of this, so I built PoDoFo without it.)

Hope that helps those who encounter the same issues that I did.

Uli
------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to