Hoard icon indicating copy to clipboard operation
Hoard copied to clipboard

Build issue on Visual Studio 2019

Open zephyr111 opened this issue 3 years ago • 2 comments

Hello,

There is a build issue in the file source/libhoard.cpp:119:

source\libhoard.cpp(119): error C2065: 'flatten': undeclared identifier
source\libhoard.cpp(119): error C2146: syntax error: missing ';' before identifier 'xxmalloc'
source\libhoard.cpp(119): error C3646: '__attribute__': unknown override specifier
source\libhoard.cpp(119): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
source\libhoard.cpp(119): error C2556: 'int xxmalloc(size_t)': overloaded function differs only by return type from 'void *xxmalloc(size_t)'
D:\git-repositories\Hoard\src\Heap-Layers/wrappers/generic-memalign.cpp(15): note: see declaration of 'xxmalloc'
source\libhoard.cpp(119): error C2040: 'xxmalloc': 'int (size_t)' differs in levels of indirection from 'void *(size_t)'
source\libhoard.cpp(119): error C2059: syntax error: '('
source\libhoard.cpp(119): error C2143: syntax error: missing ')' before '('
source\libhoard.cpp(119): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
source\libhoard.cpp(119): error C2059: syntax error: ')'
source\libhoard.cpp(119): error C2146: syntax error: missing ';' before identifier '__attribute'
source\libhoard.cpp(121): error C2143: syntax error: missing ';' before '{'
source\libhoard.cpp(121): error C2447: '{': missing function header (old-style formal list?)

AFAIK, __attribute__ is not supported by MSVC. The DLL can be built without them, but I am not sure this is fine. Maybe a MSVC equivalent should be used instead.

Thank you.

zephyr111 avatar Jan 27 '22 17:01 zephyr111

I am getting the same errors. Found this on SO, but didn't know what to do with it. Any help appreciated :)

kreisbi avatar Apr 14 '22 09:04 kreisbi

I am getting exactly the same error! (Windows 10 Pro, MS VC++ 2017)

aromring avatar Oct 06 '22 03:10 aromring