[Insight-users] ITK in XCode Project
Mike Jackson
mike.jackson at imts.us
Sun Jan 7 19:16:11 EST 2007
You have two ways of doing this. You can add the include path to the
top level ITK Directory, such as /usr/local/include/InsightToolkit
and then in your code "include" headers using the full path with in
the InsightToolkit directory, such as:
#include "Utilities/vxl/vcl/vcl_istream.h"
OR
you can include EVERY subdirectory individually in the user include
paths. If you look at the file ITKConfig.cmake in /usr/local/lib/
InsightToolkit/ there is a listing of all the directories that you
will need to include.
I think either way will work. The other way might be to make up a
CMakeLists.txt file for your project (if possible) and then use it to
generate an Xcode project. Not sure if this will work but it might be
worth a try.
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
On Jan 7, 2007, at 11:44 AM, Corrie Allen wrote:
> I tried emulating what was done in SimpleCocoaVTK - assigning lib
> and include paths through the Xcode preferences. The problem is
> that if I don't set the Header Search Path recursive button in the
> Target Info window, Xcode reports it can't find the ITK headers.
> If I do set the recursive button, I get a bunch of "error: macro
> "iscntrl" passed 2 arguments, but takes just 1" errors. Is there a
> relatively simple way to point to the ITK header tree without the
> duplicates or do I need to add each of the directories to the list
> as they do in the Xcode-built ITK examples?
> Corrie
> On Jan 7, 2007, at 7:16 AM, Mike Jackson wrote:
>
>> What exactly did Xcode not like about the ITK Libraries being down
>> in /usr/local/lib? I have done lots of apps with libraries located
>> in /usr/local/lib without any problems. Was the rpath set
>> correctly on the ITK libs maybe? If there isn't any rpath embedded
>> in the ITK libs then your application will have trouble finding
>> them, assuming a .app package setup. You would have to pass the
>> DYLD_LIBRARY_PATH environment variable to the app somehow.
>>
>>
>> --
>> Mike Jackson Senior Research Engineer
>> Innovative Management & Technology Services
>>
>>
>> On Jan 7, 2007, at 12:17 AM, Corrie wrote:
>>
>>> I'm trying to use some of ITK's libraries in an Mac OSX Xcode
>>> project. Xcode doesn't seem to like using ITK when it's built
>>> into /usr/local with cmake without any specific generator (i.e.
>>> no -GXcode). Maybe too many duplicate filenames (?) I've now
>>> used Xcode to build ITK, but now I can't figure out how to
>>> incorporate what was built into my Xcode project. Can anybody
>>> provide me with step by step instructions for getting ITK into a
>>> XCode project. I'm using ITK 3.0.0, OS X 10.4.8, XCode 2.4.1.
>>> Thanks.
>>>
>>> Corrie
>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>
More information about the Insight-users
mailing list