Gdcm source code compilation with Python wrap

Source: Internet
Author: User

Install python2.7 and cmkae.

1. Download The gdcm source code and gdcmdata package.

Http://www.creatis.insa-lyon.fr/software/public/Gdcm/

2. Download The swigwin-2.0.8 tool package windows and use the swig.exe packageProgram

Http://sourceforge.net/projects/swig/files/swigwin/

3. Use the cmake tool to produce the gdcm project file. The specific configuration is as follows:

4. After the above options are configured, configure until no errors are generated and generate the project.

5. Open gdcm. sln and use vs2008 build. By default, the build _ gdcm project will generate a link error message, as shown below:

> ------ Generated: Project: _ gdcm, configuration: Debug Win32 ------

1> link...
1> link: Fatal error lnk1104: Unable to open the file "python27_d.lib"
1> the generated logs are stored in "file: // E: \ gdcmproject \ gdcmpython \ _ gdcm. dir \ debug \ buildlog.htm"
1> _ gdcm-1 error, 0 warnings
============ Generate: 0 successful, 1 failed, 6 latest, skipped 0 ==========

By default, Python does not provide lib under debug such as python27_d.lib.

Solution: Download the Lib from the Internet and put it in the vs Directory: D: \ Program Files \ Microsoft Visual Studio 9.0 \ Vc

Continue to build. All builds should be successful.

6. build install project. gdcm is installed to the directory by default: C: \ Program Files \ gdcm

So far, DLL build is complete. Wrap for python is also included in libProgramming Language.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.