1. Coin3D
  2. Coin
  3. Pull requests

Pull requests

#2 Declined
Deleted repository
default (660f0e1d0ac5)

Add msvc10 support

  1. Fabien Spindler

I have created a new build/msvc10 forder specific to Visual C++ 2010 build and updated build\misc\install-sdk.bat . Theses modifications allow to build coin with msvc10 and use it after as a 3rd party project.

Note that importing the msvc9 sln file in Visual C++ 2010 alows also to build Coin, but when using Coin as a 3rd party project to build the wery simple sample given below we lead to errors due to the fact that stdint.h comes with msvc10 (and not with msvc9):

-- sample.cpp --

include <stdint.h>

include <Inventor/VRMLnodes/SoVRMLGroup.h>

int main() {}

3>C:\soft\third-party\Coin3D\Coin-default-install\include\Inventor/system/inttypes.h(138): error C2371: 'int8_t' : redefinition; different basic types 3> c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h(17) : see declaration of 'int8_t'

This error comes since stdint.h defines 'int8_t' as 'signed char' while Coin3D redefines in inttypes.h 'int8_t' as 'char'. Since stdint.h comes with Visual, Coin3D shouldn't redefine 'int8_t'. The proposed modifications intend to provide the right inttypes.h file.


Comments (23)

  1. Amit Aronovitch

    Hi Fabien,

    It appears like you did not "hg add" the newly created vcxproj files to your repository, so people trying to use it will have to go through the conversion wizard again. I pulled your code into my fork, and fixed that issue, and also added some other fixes (Note that as a result of having to run the wizard again, my solution file got different UID than yours). I have given you write permissions to my fork https://bitbucket.org/amitar/coin, because I want this fork to merge in several other pull requests and open issues from the original Coin3D, so people can use it to avoid code-rot until somebody takes back the lead.

  2. Roy Walmsley

    Hi Amit and Fabian,

    I am starting to go through the outstanding issues and pull requests. I see that you guys had some discussion on this. I don't have Visual C++ 2010 so I can't test your addition. Is it safe, or has Amit got further improvements?

    Also, Amit, what other things were you wanting to include?


  3. Bastiaan Veelo


    I am just wondering: this seems like a lot of code duplication and generated files. Do we really need this to be in the repository? If these really need to be below the msvc10 dir, wouldn't it be better to have a script generate them from the source?

    EDIT: I mean primarily the files in "data".


  4. Fabien Spindler author


    I agree, this is not the right way to do this. It would be better/easier for the end users to use CMake rather then adding specific build files for each compiler. You should do the work for msvc 10,11,12 and tomorrow 13...


    1. Bastiaan Veelo

      For someone who has never used cmake: what advantage does cmake have over Cygwin+autoconf? Would it make the MSVC project files obsolete? Kongsberg/SIM preferred the Cygwin build method because it is the same on all other platforms, and I think the MSVC project files are only there for users who want to compile themselves but are uncomfortable with the command line. Would these users be comfortable with cmake? Would cmake replace the current build system on all platforms?


      1. Billy Araujo

        I have never used Cygwin+autoconf but with CMake you don't need to install cygwin which I think is an overkill just to create a project in Windows. Since I started using CMake I don't want anything else. With CMake you can use command line or GUI depending on you preference. CMake finds dependencies and can build almost any type of project (MSVC 6, 2005, 2008, 2010, 2012 etc.), unix makefiles, codeblock projects, etc. If done correctly, CMake would render MSVC project files obsolete. I don't store my MSVC project files in source control anymore. But you could still make them available for people who don't want to run CMake.

  5. Fabien Spindler author

    CMake has a GUI that allows to use it without any command line. CMake is platform (OSX, Windows, Linux) and compiler (g++, icc, msvc, mingw, cygwin) independent.
    You have to write the CMake script file in CMakeLists.txt files and depending on the platform + compiler you select in the GUI it will generate all the configuration files (Makefile, coin.sld, coin.xproject...) requested to build your project.

    Sure it will make the MSVC project files obsolete and will replace the current build system on all platforms.


  6. Bastiaan Veelo

    OK that sounds good and a bit scary ;) Who would have the time to do this? And not only for Coin, but all Coin3D family members? I guess it would need a lot of testing on different platforms/compilers, but hopefully it can live side by side the present build methods so that we don't need it in a separate branch or fork?


  7. Roy Walmsley


    CMake seems to be something to consider. Again, I haven't used it before, but I have now downloaded and installed CMake on my Windows PC. Do you have an example CMakeLists.txt file so that I can have a play?


  8. Billy Araujo

    I can help on testing and edit some CMakeLists.txt files but I don't have too much time and I don't know so much about Coin3D structure and dependencies. Usually in my projects, in the root (main) CMakeLists.txt I have a list environment variables to setup:

    #Specify the version being used aswell as the language
    cmake_minimum_required(VERSION 2.6)
    #Name your project here

    Since my project depends on Eigen3, I would have something like this (I don't know the dependancies of Coin3D):

    #Configure options

    This allows CMake to get the current environment variable for Eigen3 if defined. If it isn't defined, the user may specify it using CMake-GUI. This is mostly used when CMake doesn't have a builtin Find script to get these definitions for me. I could also build my own CMake find scripts.

    Then I add other sub-directories which have to contain another CMakeLists.txt file:



    Then these CMakeLists.txt files get a little bit more complicated. In these I add more sub-directories or define sources (SOURCE_GROUP), include directories (INCLUDE_DIRECTORIES), link directories (LINK_DIRECTORIES), flags (ADD_DEFINITIONS), find dependencies (FIND_PACKAGE), etc.

    There are 2 types of sub-projects I use: Executable - (ADD_EXECUTABLE) Library - (ADD_LIBRARY)

    Link: http://www.cmake.org/cmake/help/examples.html

  9. Roy Walmsley


    I have declined this pull request - I don't seem to have an option to actually close it. Let me know if this is still affecting your automatic build system.