Thread: Xcode compile error with postgres.h and pg_type.h
I am trying to include the following PostgreSQL headers files into my Xcode 7.2 project: #import "postgres.h" #import "pg_type.h" #import "libpq-fe.h" The app is written in Swift. I have an Objective-C bridging header. If I just import "libpq-fe.h" there are no compile errors. When I try to import "postgres.h" and "pg_types.h" to get access to certain constants, I get an error with a PostgreSQL file: "c.h" "Typedef redefinition with different types ('size_t' (aka 'unsigned long') vs 'long') The previous definition is in OS X 10.11 > user/include > MacTypes.h So there are two headers with the same definition: PostgreSQL > c.h typedef size_t Size OSX > MacTypes.h typedef long Size If I comment out the definition in the PostgreSQL file then the project compiles. But I don't want to do that, I was just curious. Does anyone know a way around this? Merlin-moncure mentioned using a 'backend header' but so far I have not been able to figure this out. Thanks in advance. -- View this message in context: http://postgresql.nabble.com/Xcode-compile-error-with-postgres-h-and-pg-type-h-tp5886128.html Sent from the PostgreSQL - novice mailing list archive at Nabble.com.