[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem building 0.8.0 with VS 2015
[Thread Prev] | [Thread Next]
- Subject: Problem building 0.8.0 with VS 2015
- From: John Dunn <John.Dunn@xxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 10 Aug 2018 15:42:55 +0000
- To: "libssh@xxxxxxxxxx" <libssh@xxxxxxxxxx>
Hello I'm trying to build the 0.8.0 tag from git using VS 2015 and am having compile issues. I'm using the CMake 3.11.0 GUI on windows to configure. The configuration works fine but when I open the generated solutions the projects don't build. When building ssh_shared I get the following error 2>C:\code\libssh\libssh\src\init.c(47): error C2061: syntax error: identifier '__attribute__' I believe this is due to these defines in init.c #define CONSTRUCTOR_ATTRIBUTE __attribute__((constructor)) #define DESTRUCTOR_ATTRIBUTE __attribute__((destructor)) On Win32, defining as #define CONSTRUCTOR_ATTRIBUTE #define DESTRUCTOR_ATTRIBUTE Appears to fix the problem. I've attached a patch that addresses this issue. Please let me know if there is an issue with my change or if the patch is incorrectly formatted. Thanks John Signed-off-by: John Dunn <john.dunn@xxxxxxx>
Attachment:
fix_win32_build.patch
Description: fix_win32_build.patch
Re: Problem building 0.8.0 with VS 2015 | Joseph Southwell <jsouthwell@xxxxxxxxxxxxxxxxxxxx> |
Re: Problem building 0.8.0 with VS 2015 | Andreas Schneider <asn@xxxxxxxxxxxxxx> |