[CMake] Solaris using gcc to link instead of g++

William A. Hoffman billlist at nycap.rr.com
Mon Aug 7 11:00:35 EDT 2006


I think that the problem was sun was shipping with a gcc that did not have
a shared stdc++, so if you created shared libraries with g++ they did not link.

-Bill


At 10:36 AM 8/7/2006, Michael Bell wrote:
>Hi,
>
>When compiling ITK2.8 on Solaris 5.9 with gcc 3.3.1, files are being
>compiled correctly with g++, but libraries are being linked with gcc.
> From a random link.txt:
>gcc  -fPIC   -shared  -Wl,-hlibITKIO.so.2.8 -o ../../bin/libITKIO.so.2.8.0  ...
>
>This problem requires me to manually link stdc++.
>
>Compiling from the exact same codebase on linux works correctly. I
>compared the cmake configuration, and they are the same (different
>paths to the same programs), except linux uses gmake while solaris
>uses make.
>
>Why would solaris use gcc to link? What can I do about it?
>
>thanks,
>michael
>
>
>-- 
>michael.bell at acm.org
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list