[vtkusers] OS X 10.3 and VTK Application Build

Rhazes Spell rus1 at duke.edu
Mon Jan 3 11:19:41 EST 2005


I was able to solve this problem from the assistance of the following  
two articles on setting up VTK for Cocoa development and correspondence  
with the article's author, Drew McCormack.  (This may be redundant to a  
previous post in the archive, but I did not find these articles  
referenced.  They are an excellent resource for any interested in doing  
VTK development within XCode.)

Developing visualization applications with Cocoa and VTK (pt1 and 2)
http://www.macdevcenter.com/pub/a/mac/2003/02/11/dev_osx.html
http://www.macdevcenter.com/pub/a/mac/2003/03/25/dev_osx.html?page=1

The complication that I had below was that I did not set the path to  
the VTK libraries in my Target setup.  Here are the steps that I  
followed, courtesy of Drew:
 From your project in XCode
- Click on the target
- Show Info
- Got to compiler settings and find the library search path.
- Make sure it has the path to the static vtk library directory  
included.

Happy Coding.

On Jan 1, 2005, at 4:41 PM, Rhazes Spell wrote:

> Hello-
> I am a VTK (and sci vis) newbie, and  I am trying to run some of the  
> example code from the VTK 4.4 distribution to learn the libraries.  I  
> have successfully installed CMake and VTK.  Thus far, I am able to  
> build and run the simple Cone.cxx example successfully.  I was also  
> able to run the Cone example as an Objective-C++ application  
> (Cone.mm).  However, my initial success was from the commmand line,  
> and eventually I would like to program the application that I am  
> working on in Objective-C++ using Cocoa in XCode.  As a result, I  
> tried to build and run the Cone example in Xcode, but I have had no  
> success thus far.  Specifically, I am getting the following output  
> when I build and run:
>
> Native Build of Target "Learning"
>
> CompileC build/Learning.build/Learning.build/Objects-normal/ppc/Cone.o  
> Cone.mm normal ppc objective-c++ com.apple.compilers.gcc.3_3
>     mkdir -p  
> /Users/rhazes/Projects/Development/vtk/tmp/Learning/build/ 
> Learning.build/Learning.build/Objects-normal/ppc
>     cd /Users/rhazes/Projects/Development/vtk/tmp/Learning
>     /usr/bin/gcc-3.3 -x objective-c++ -arch ppc -pipe -Wno-trigraphs  
> -fasm-blocks -fpascal-strings -g -O0 -mtune=G4  
> -Wno-four-char-constants -Wmost -Wno-four-char-constants  
> -Wno-unknown-pragmas -O0 -fmessage-length=0 -ffix-and-continue  
> -F/Users/rhazes/Projects/Development/vtk/tmp/Learning/build  
> -I/Users/rhazes/Projects/Development/vtk/tmp/Learning/build/include  
> -I/Users/rhazes/Projects/Development/vtk/tmp/Learning/build/ 
> Learning.build/Learning.build/DerivedSources  
> -Wp,-header-mapfile,/Users/rhazes/Projects/Development/vtk/tmp/ 
> Learning/build/Learning.build/Learning.build/Learning.hmap -c  
> /Users/rhazes/Projects/Development/vtk/tmp/Learning/Cone.mm -o  
> /Users/rhazes/Projects/Development/vtk/tmp/Learning/build/ 
> Learning.build/Learning.build/Objects-normal/ppc/Cone.o
>
> Ld /Users/rhazes/Projects/Development/vtk/tmp/Learning/build/Learning
>     cd /Users/rhazes/Projects/Development/vtk/tmp/Learning
>     /usr/bin/g++-3.3 -o  
> /Users/rhazes/Projects/Development/vtk/tmp/Learning/build/Learning  
> -L/Users/rhazes/Projects/Development/vtk/tmp/Learning/build  
> -L/Users/rhazes/Library/Development/vtk-cocoa/bin  
> -L/usr/lib/gcc/darwin/3.3  
> -F/Users/rhazes/Projects/Development/vtk/tmp/Learning/build -filelist  
> /Users/rhazes/Projects/Development/vtk/tmp/Learning/build/ 
> Learning.build/Learning.build/Objects-normal/Learning.LinkFileList  
> -framework OpenGL -lvtkRendering -lvtkGraphics -lvtkImaging  
> -lvtkFiltering -lvtkCommon -arch ppc
> ld:  
> /Users/rhazes/Library/Development/vtk-cocoa/bin/ 
> libvtkCommon.a(vtkMultiThreader.o) illegal reference to symbol:  
> _MPProcessors defined in indirectly referenced dynamic library  
> /System/Library/Frameworks/CoreServices.framework/Versions/A/ 
> Frameworks/CarbonCore.framework/Versions/A/CarbonCore
>
>
> In XCode I have added the OpenGL framework and imported all of the VTK  
> Header files (961 in total, correct?).  Any help that you can provide  
> would be immensely appreciated, and I will be sure to contribute my  
> lessons learned back to the community.
> **************************************
> Rhazes Spell, Ph.D.
> Post-Doctoral Research Associate
>
> Duke University
> Center for Computational Science Engineering and Medicine
> Visualization Technology Group
>
> 919.660.5595 (office)
>
> ***************************************________________________________ 
> _______________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:  
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 4810 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050103/db1c4fee/attachment.bin>


More information about the vtkusers mailing list