MathGL - problem with installation under Visual Studio 2013

Anonymous
2014-03-03
2016-03-09
  • Anonymous - 2014-03-03

    Dear Alexey,

    I am working at the Lodz University of Technology on scientific project on multibiometrics.

    I would be very grateful for helping me with the following problem:

    I can not compile the MathGL library with Visual Studio 2013.

    When I use Visual Studio 2012 everything is perfectly OK (I checked it on other machine with Visual Studion 2012 installed).

    In Visual Studio 2013 I get a lot of errors. I copied part of content of the output window and pasted it below this message, so that you can see what kind of errors these are.

    In both versions of Visual Studio I use exactly the same compilation procedure described below:

    1. Take recent sources from http://svn.code.sf.net/p/mathgl/code
    2. Use CMake to generate binaries.
    3. Indicate the mathgl-2x subfolder for CMake as the input source directory
    4. Uncheck all CMake options except enable-double
    5. Open project in Visual Studio and compile it

    Could you please look at the problem and help me? MathGL is a great library that I together with my team want to use, but I must use Visual Studio 2013 in my research project. I would be very grateful for any help.

    Best regards,
    Wojciech Sankowski

    3> addon.cpp
    3>D:\MyLibs\MathGL\mathgl\mathgl-2x\include\mgl2/define.h(101): warning C4005: 'NAN' : macro redefinition
    3> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\math.h(106) : see previous definition of 'NAN'
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(188): error C2059: syntax error : '('
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(188): error C2062: type 'double' unexpected
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(188): error C2027: use of undefined type 'std::enable_if'
    3> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtr1common(67) : see declaration of 'std::enable_if'
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(188): warning C4346: 'std::_Is_numeric<_Ty2>::value' : dependent name is not a type
    3> prefix with 'typename' to indicate a type
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(188): error C2226: syntax error : unexpected type '_Ty1'
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(189): error C2062: type 'double' unexpected
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(189): error C2027: use of undefined type 'std::enable_if'
    3> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtr1common(67) : see declaration of 'std::enable_if'
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(189): warning C4346: 'std::_Is_numeric<_Ty2>::value' : dependent name is not a type
    3> prefix with 'typename' to indicate a type
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(189): error C2226: syntax error : unexpected type '_Ty1'

     
  • Alexey Balakin

    Alexey Balakin - 2014-03-08

    Hi, I hope that I already fix it in latest SVN commit. Can you check this?

     
  • Anonymous - 2014-03-18

    Dear Alexey,

    I am afraid it did not help. I have just taken the current sources from:
    http://svn.code.sf.net/p/mathgl/code
    In Visual Studio 2013 I still get a lot of errors. I copied part of content of the Visual Studio output window and pasted it below this message, so that you can see what kind of errors these are.

    Best regards,
    Wojciech Sankowski

    3> addon.cpp
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/define.h(98): warning C4305: 'initializing' : truncation from 'int64' to 'const unsigned long'
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/define.h(98): warning C4309: 'initializing' : truncation of constant value
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/define.h(101): warning C4305: 'initializing' : truncation from '
    int64' to 'const unsigned long'
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/define.h(101): warning C4309: 'initializing' : truncation of constant value
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(188): error C2059: syntax error : '('
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(188): error C2062: type 'double' unexpected
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(188): error C2027: use of undefined type 'std::enable_if'
    3> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtr1common(67) : see declaration of 'std::enable_if'
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(188): warning C4346: 'std::_Is_numeric<_Ty2>::value' : dependent name is not a type
    3> prefix with 'typename' to indicate a type
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(188): error C2226: syntax error : unexpected type '_Ty1'
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(189): error C2062: type 'double' unexpected
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(189): error C2027: use of undefined type 'std::enable_if'
    3> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtr1common(67) : see declaration of 'std::enable_if'
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(189): warning C4346: 'std::_Is_numeric<_Ty2>::value' : dependent name is not a type
    3> prefix with 'typename' to indicate a type
    3>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtgmath.h(189): error C2226: syntax error : unexpected type '_Ty1'
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/type.h(79): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/type.h(130): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/pde.h(37): warning C4190: 'ham' has C-linkage specified, but returns UDT 'std::complex<double>' which is incompatible with C
    3> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\complex(846) : see declaration of 'std::complex<double>'
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/pde.h(41): warning C4190: 'ham' has C-linkage specified, but returns UDT 'std::complex<double>' which is incompatible with C
    3> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\complex(846) : see declaration of 'std::complex<double>'
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/pde.h(45): warning C4190: 'ham' has C-linkage specified, but returns UDT 'std::complex<double>' which is incompatible with C
    3> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\complex(846) : see declaration of 'std::complex<double>'
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/pde.h(49): warning C4190: 'ham' has C-linkage specified, but returns UDT 'std::complex<double>' which is incompatible with C
    3> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\complex(846) : see declaration of 'std::complex<double>'
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/data.h(206): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/data.h(209): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/data.h(221): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/data.h(224): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/data.h(227): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
    3>D:/MyLibs/MathGL/mathgl/mathgl-2x/include\mgl2/data.h(418): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
    3>D:\MyLibs\MathGL\mathgl\mathgl-2x\src\addon.cpp(44): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    3> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\string.h(112) : see declaration of 'strcpy'
    3>D:\MyLibs\MathGL\mathgl\mathgl-2x\src\addon.cpp(93): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    3> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\string.h(112) : see declaration of 'strcpy'

     
  • Alexey Balakin

    Alexey Balakin - 2014-03-18

    Ops, my mistake -- I forgot that long is 32bit integer for WIN32. I've fixed it in latest SVN commit. Can you check this?

     
  • Anonymous - 2014-03-19

    Dear Alexey,

    I am afraid there are still problems. I have just taken the current sources from:
    http://svn.code.sf.net/p/mathgl/code
    In Visual Studio 2013 I still get a lot of errors. I attach the text file where I copied the content of the Visual Studio output window, so that you can see what kind of errors these are.

    Best regards,
    Wojciech Sankowski

     
  • Alexey Balakin

    Alexey Balakin - 2014-03-20

    Hi, can you send me file xtgmath.h? It looks as the bug (or issue) of VS2013.

     
  • Anonymous - 2014-03-24

    Dear Alexey,

    I am sending the file you requested. Hope that helps.

    Best regards,
    Wojciech Sankowski

     
  • Alexey Balakin

    Alexey Balakin - 2014-03-25

    Dear Wojciech,
    I hope that I fix these incompatibilities in SVN rev.937. Could you check?

     
    • Comment has been marked as spam. 
      Undo

      You can see all pending comments posted by this user  here

      Anonymous - 2015-10-02

      Hello,

      is there from your side any possibility to deliver the binaries generated with MSVC2013?
      I use your great library into my Qt5.5 project compiling with MinGW but would appreciate to use msvc2013 compiler as working on windows 32. Unfortunately i am sticking with compiling it myself....

      thanks in advance,
      C.Hoël

       
  • Anonymous - 2014-03-28

    Dear Alexey,

    Your last changes solved the problem! When I take current sources from:
    //svn.code.sf.net/p/mathgl/code/mathgl-2x
    the MathGL compiles without errors in Visual Studio 2013.

    Thank you very, very much for your help. I really appreciate it.

    Best regards,
    Wojciech Sankowski

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2015-09-26

    Hi Wojcieh,

    do you have any possibilities to shre the mathGL binaries compiled with mcvc2013?
    I am willing to use it with Qt5.5 and msvc2013 compiler.

    thanks,
    Chris.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks