[CMake] Trouble getting XCode generator working

William A. Hoffman billlist at nycap.rr.com
Thu Oct 6 10:24:37 EDT 2005


To produce an OSX bundle you need to do the following:

ADD_EXECUTABLE(BundleTest MACOSX_BUNDLE BundleTest.cxx)


See documentation for ADD_EXECUTABLE:
http://www.cmake.org/HTML/Documentation.html

As for the link errors, this may be a bug.   You could do a make VERBOSE=1 in
the makefile version, and look at the detailed build logs in XCode and post
the different link lines and maybe we could figure out what was wrong.

-Bill

At 09:19 AM 10/6/2005, David Cole wrote:
>What are you building? CMake, VTK, some other project?
>
>What do you mean in your PS by "doesn't produce a working macos application bundle"? Does it produce a bundle that "doesn't work," or does it *not* produce a bundle with correct structure, or something else?
>
>Maybe you're missing a lib from your TARGET_LINK_LIBRARIES command...?
>
>More info?
>David
>
>David Flitney wrote:
>
>>OS: MacOSX 10.4
>>CMake: 2.2-beta
>>XCode: 2.1
>>
>>If I try to use the XCode generator I'm getting an error during final linking within the IDE:
>>
>>/usr/bin/ld: Undefined Symbols:
>>std::__default_alloc_template<true, 0>::deallocate(void*, unsigned long)
>>std::__default_alloc_template<true, 0>::allocate(unsigned long)
>>std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage
>>std::basic_istream<char, std::char_traits<char> >::seekg(long, std::_Ios_Seekdir)
>>__ZNSt15basic_streambufIcSt11char_traitsIcEED4Ev
>>collect2: ld returned 1 exit status
>>
>>Any ideas?
>>
>>PS. A straight unix makefile build goes fine but doesn't produce a working macos application bundle so I thought I'd try XCode instead.
>>
>>-- 
>>Cheers, Dave
>>
>>Dave Flitney, IT Manager
>>Oxford Centre for Functional MRI of the Brain
>>E:flitney at fmrib.ox.ac.uk W:+44-1865-222713 F:+44-1865-222717
>>URL: http://www.fmrib.ox.ac.uk/~flitney
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>CMake mailing list
>>CMake at cmake.org
>>http://www.cmake.org/mailman/listinfo/cmake
>> 
>
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list