Overview
Features
Download
Documentation
Community
Add-Ons & Services

Poco compile errors on OS X 10.8 using clang & cmake

Please post support and help requests here.

Poco compile errors on OS X 10.8 using clang & cmake

Postby pjwhite » 30 Aug 2012, 04:48

I am excited about incorporating Poco into my application, however need it to compile cross platform. I was assuming that this would work by default, however on 10.8 I am getting compile errors. This is on an svn checkout from earlier today.

Configuring with cmake:

Code: Select all
$ cd poco-trunk--28082012
$ cmake .
-- The C compiler identification is GNU
-- The CXX compiler identification is Clang
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Setting Poco build type - RelWithDebInfo
-- Optimized output enabled
-- Building dynamic libraries
-- Building without tests & samples
-- Build with using internal copy of sqlite, libz, pcre, expat, ...
-- Found OpenSSL: /usr/lib/libssl.dylib;/usr/lib/libcrypto.dylib (found version "0.9.8")
-- Couldn't find MySQL
-- Found APR: /usr/lib/libapr-1.dylib
-- Found APRUTIL: /usr/lib/libaprutil-1.dylib
-- Found APACHE: /usr/include/apache2
-- Couldn't find unixODBC
-- Found iODBC: iodbc-config in /usr/bin/iodbc-config
-- UNIX ODBC: UNIX_ODBC_CONFIG-NOTFOUND
-- IODBC: /usr/bin/iodbc-config
-- ODBC Support Enabled
-- CMake 2.8.6 successfully configured Poco using Unix Makefiles generator
-- Installation target path: /usr/local
-- C_FLAGS:  =
-- CXX_FLAGS:=
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/patrick/Documents/poco-trunk-28082012
$ make


Note the compiler chosen is clang++ ( c++ -v shows Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn) )

Compilation is fine ( with a few warnings ) for libPocoFoundation.dylib, libPocoXML.dylib, libPocoJSON.dylib, libPocoPDF.dylib, libPocoUtil.dylib, libPocoNet.dylib, libPocoCrypto.dylib, libPocoNetSSL.dylib.

However, PocoData cannot compile and errors out:


Code: Select all
Scanning dependencies of target PocoDataSQLite
[ 91%] Building CXX object Data/SQLite/CMakeFiles/PocoDataSQLite.dir/src/Binder.cpp.o
[ 92%] Building CXX object Data/SQLite/CMakeFiles/PocoDataSQLite.dir/src/Connector.cpp.o
[ 92%] Building CXX object Data/SQLite/CMakeFiles/PocoDataSQLite.dir/src/Extractor.cpp.o
In file included from /Users/patrick/Documents/poco-trunk-28082012/Data/SQLite/src/Extractor.cpp:37:
/Users/patrick/Documents/poco-trunk-28082012/Data/SQLite/include/Poco/Data/SQLite/Extractor.h:263:9: error: variable has incomplete type 'Poco::Data::Date'
                        Date d;
                             ^
/Users/patrick/Documents/poco-trunk-28082012/Data/include/Poco/Data/AbstractExtractor.h:66:7: note: forward declaration of 'Poco::Data::Date'
class Date;
      ^
In file included from /Users/patrick/Documents/poco-trunk-28082012/Data/SQLite/src/Extractor.cpp:37:
/Users/patrick/Documents/poco-trunk-28082012/Data/SQLite/include/Poco/Data/SQLite/Extractor.h:270:9: error: variable has incomplete type 'Poco::Data::Time'
                        Time t;
                             ^
/Users/patrick/Documents/poco-trunk-28082012/Data/include/Poco/Data/AbstractExtractor.h:67:7: note: forward declaration of 'Poco::Data::Time'
class Time;
      ^



Does anyone have any hints on how to fix this?
pjwhite
 
Posts: 11
Joined: 30 Aug 2012, 04:45

Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron