[CMake] CMake problems OSX 10.4 64-bit

William A. Hoffman billlist at nycap.rr.com
Mon Jun 5 22:19:11 EDT 2006


At 07:02 PM 6/5/2006, jonathan grimm wrote:
>This program is failing with the errors below.  A corresponding
>c(stdio) program works.
>This started on the vtkusers list.  I am getting compile errors with VTK kwsys.
>Any suggestions?
>this is with -arch ppc64
>
>PROJECT (Hello64)
>
>ADD_EXECUTABLE(Hello64 hello.c)
>ADD_EXECUTABLE(HelloCXX64 hello.cxx)
>
>#include <iostream>
>using namespace std;
>int main(int argc,char** argv){
>  cout << "Hello world!" << endl;
>  return 0;
>}
>
>
>ONHBL-Storage:/Volumes/RAID1/source/hello64 jonathan$ make
>Linking CXX executable HelloCXX64
>can't resolve symbols:
> std::basic_ostream<char, std::char_traits<char>
>>::operator<<(std::basic_ostream<char, std::char_traits<char> >&
>(*)(std::basic_ostream<char, std::char_traits<char> >&)), referenced
>from:
>     _main in hello.o
> std::ios_base::Init::Init(), referenced from:
>     __static_initialization_and_destruction_0(int, int)in hello.o
> std::ios_base::Init::~Init(), referenced from:
>     __static_initialization_and_destruction_0(int, int)in hello.o
> std::cout, referenced from:
>     _main in hello.o
> std::basic_ostream<char, std::char_traits<char> >& std::endl<char,
>std::char_traits<char> >(std::basic_ostream<char,
>std::char_traits<char> >&), referenced from:
>     _main in hello.o
> std::basic_ostream<char, std::char_traits<char> >& std::operator<<
><std::char_traits<char> >(std::basic_ostream<char,
>std::char_traits<char> >&, char const*), referenced from:
>     _main in hello.o
> ___gxx_personality_v0, referenced from:
>     EH_frame1 in hello.o


Looks like it can not find the c++ run time libraries or is not linking them.
You could try make VERBOSE=1 and see the command used.  Can you compile
hello.cxx on the command line?
c++ hello.cxx?

-Bill



More information about the CMake mailing list