0

I'm trying to add the openjpeg library to my XCode 4 project so that I can compress images taken by the iPhone's camera to jpeg2000.

I built the static library (libopenjpeg.a) using Cmake on OS/X. (I'm guessing this may have been the first error, that it needs to be built by XCode so it's built for iPhone architecture and not OS X).

I have the library added in the Link Binary with Libraries of my target.

The project builds successfully but I can't seem to import any of the headers from the library into any of my Objective-C classes. I've tried manually adding the folder that contains the libopenjpeg header files to the User Header Search Path but that did not seem to do anything.

Any suggestions?

4

2 に答える 2

0

最も単純なソリューションの場合

ヘッドファイルをプロジェクトのソースにインポートします。

于 2012-07-20T03:25:19.067 に答える
0

CMakeを使用してコマンドラインでビルドすることもできます。コンパイル時に正しいフラグが渡されるように、CMakeLists.txtファイルを変更する必要があります。

ただし、Gavinが示すように、ヘッダーとソースファイルをライブラリからXcodeプロジェクトにドラッグし、静的ライブラリの構築を控える方が簡単な場合があります。

于 2012-07-20T03:34:20.393 に答える