Open JeffyOLOLO opened 6 years ago
i included <algorithm>
where need for std::max()
.
and i found and inserted a code of vasprintf()
and the build was succeeded.
but a commenting of not compilable code it isn't solution, isn't it?
int vasprintf( char **sptr, const char *__restrict fmt, va_list ap )
{
*sptr = NULL;
int count = vsnprintf( NULL, 0, fmt, ap ); // Query the buffer size required.
if( count >= 0 ) {
char* p = static_cast<char*>(malloc(count+1)); // Allocate memory for it.
if ( p == NULL )
return -1;
if ( vsnprintf( p, count+1, fmt, ap ) == count ) // We should have used exactly what was required.
*sptr = p;
else { // Otherwise something is wrong, likely a bug in vsnprintf. If so free the memory and report the error.
free(p);
return -1;
}
}
return count;
}
i included
<algorithm>
where need forstd::max()
. and i found and inserted a code ofvasprintf()
and the build was succeeded. but a commenting of not compilable code it isn't solution, isn't it?int vasprintf( char **sptr, const char *__restrict fmt, va_list ap ) { *sptr = NULL; int count = vsnprintf( NULL, 0, fmt, ap ); // Query the buffer size required. if( count >= 0 ) { char* p = static_cast<char*>(malloc(count+1)); // Allocate memory for it. if ( p == NULL ) return -1; if ( vsnprintf( p, count+1, fmt, ap ) == count ) // We should have used exactly what was required. *sptr = p; else { // Otherwise something is wrong, likely a bug in vsnprintf. If so free the memory and report the error. free(p); return -1; } } return count; }
Can you post modified files? I'm having same issue and try to apply same changes, but without success
when i try compile g2o emerge internal compile error in a file g2o/core/matrix_operations.h in a template
axpy
. when i comment the template then the error emerge in a templateatxpy
. when i comment it also, then compilator can't findstd::max()
andvasprintf()
function.i tried add more memory in swap space (#305), but it still not work for VS compilator.
maybe Windows requires somewhere its own inclusions somewhere instead Unix inclusions?
i'm using the latest Eigen version - 3.3.4. also, i try with 3.3.1-3.3.3
Visual Studio build output: