Compile Problem Visual Studio 2015

All about Windows versions
sstark
Posts: 2
Joined: Thu Jul 21, 2016 12:30 am

Compile Problem Visual Studio 2015

Postby sstark » Thu Jul 21, 2016 12:36 am

Can't seem to get rid of INTMAX_MAX undeclared which shows up in ratio.h and chrono.h
Everything else looks good (so far)...

Any hints?

partial:
1>------ Build started: Project: QCC_DB_LIB, Configuration: Debug x64 ------
1> ccCameraSensor.cpp
1> ccGBLSensor.cpp
1> ccGenericPointCloud.cpp
1> ccGriddedTools.cpp
1> ccHObject.cpp
1> ccHObjectCaster.cpp
1> ccImage.cpp
1> ccIndexedTransformationBuffer.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ratio(111): error C2065: 'INTMAX_MAX': undeclared identifier
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ratio(123): note: see reference to class template instantiation 'std::ratio<_Nx,_Dx>' being compiled
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ratio(113): error C2065: 'INTMAX_MAX': undeclared identifier
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ratio(26): error C2065: 'INTMAX_MAX': undeclared identifier
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ratio(165): note: see reference to class template instantiation 'std::_Ratio_add<_R1,_R2>' being compiled
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ratio(216): error C2338: integer arithmetic overflow

daniel
Site Admin
Posts: 3375
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Compile Problem Visual Studio 2015

Postby daniel » Thu Jul 21, 2016 6:54 am

On my side (with VS 2013) INTMAX_MAX is apparently not used.

It is defined in 'stdint.h' (but in a deactivated section):

Code: Select all

#define INTMAX_MAX   INT64_MAX
Daniel, CloudCompare admin

sstark
Posts: 2
Joined: Thu Jul 21, 2016 12:30 am

Re: Compile Problem Visual Studio 2015

Postby sstark » Thu Jul 21, 2016 7:20 pm

INTMAX_MAX is defined in stdint.h but as Daniel said, in a deactivated section...

#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) //

So I added this define: __STDC_LIMIT_MACROS to the CloudCompare project properties (C++ Preprocessor Definitions)

And it compiled. Not sure why that was needed.
Thanks.

ksw221
Posts: 1
Joined: Fri Sep 02, 2016 1:33 am

Re: Compile Problem Visual Studio 2015

Postby ksw221 » Sat Sep 03, 2016 3:08 pm

Hi, I resolved this issue with vs2015.
I added __STDC_LIMIT_MACROS definition to "CMakeSetCompilerOptions.cmake" file as follows.

Code: Select all

add_definitions(-DNOMINMAX -D_CRT_SECURE_NO_WARNINGS [b]-D__STDC_LIMIT_MACROS[/b]).


Additionally, I added construction function to GenericIndexedCloudPersist.h file for Registration Tool functionality as follows.

Code: Select all

class CC_CORE_LIB_API GenericIndexedCloudPersist : virtual public GenericIndexedCloud
{

public:
   [b]GenericIndexedCloudPersist() {}[/b]
   //! Default destructor
   virtual ~GenericIndexedCloudPersist() {}

daniel
Site Admin
Posts: 3375
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Compile Problem Visual Studio 2015

Postby daniel » Thu Oct 06, 2016 8:45 am

It took me some time but I added the same modifications to the project files.

Thanks for the feedback.
Daniel, CloudCompare admin

Gaeth
Posts: 1
Joined: Thu Nov 24, 2016 7:57 am

Re: Compile Problem Visual Studio 2015

Postby Gaeth » Fri Nov 25, 2016 7:16 am

daniel wrote:It took me some time but I added the same modifications to the project files.

Thanks for the feedback.


Just wanted to take the time to say thanks Daniel for taking the time to do stuff like this.


Return to “Windows related topics”

Who is online

Users browsing this forum: No registered users and 2 guests