[ITK] [ITK-users] Does ITK 4.6 support C++11 for OSX?
Tim Allman
dr.tim.allman at gmail.com
Fri Jul 18 18:53:49 EDT 2014
I have compiled ITK 4.6 successfully on OSX 10.9. The options I used in CMAKE_CXX_FLAGS are -std=gnu++11 -stdlib=libstdc++.
The important option is -stdlib. The current default for clang++ is libc++ but the default for Xcode 5 is libstdc++ so if you are not careful you will get ITK built with one and your project built with the other. This will give linker errors.
Tim
On Jul 18, 2014, at 16:27 , Becksfort, Jared <Jared.Becksfort at STJUDE.ORG> wrote:
> I had trouble at one point with a C++11 build. My problem was that OSX 10.8 did not use the correct standard library by default. It used (I believe) cstdlib, but libc++ is what is needed. You can try your luck at using libc++ in the build commands or upgrade to 10.9 if you haven’t already.
>
> I am 99% sure I build ITK version 4.6 on it. I don’t have that computer handy at the moment so I can’t check. The computer is a work computer, so I actually just had it re-imaged to 10.9 rather than a straight upgrade. That could result in some differences potentially.
>
> Good Luck,
> Jared
>
> From: Insight-users [mailto:insight-users-bounces at itk.org] On Behalf Of Jim Choate
> Sent: Friday, July 18, 2014 2:40 PM
> To: insight-users at itk.org
> Subject: [ITK-users] Does ITK 4.6 support C++11 for OSX?
>
> Hi, has anyone successfully used ITK 4.6 with a project built in XCode 5 for C++11?
>
> Right now, we're getting 'Undefined symbols for architecture x86_64' for many symbols, such as itk::ProcessObject::MakeOutput when linking.
>
> The owner of ITK on our team says this is caused by ITK not supporting C++11. Is this true?
>
> He rebuilt ITK 4.6 with C++11 flags.
>
> Thank you!
>
> Email Disclaimer: www.stjude.org/emaildisclaimer
> Consultation Disclaimer: www.stjude.org/consultationdisclaimer
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list