trendmicro / tlsh

Other
732 stars 136 forks source link

Using C++ library with Visual Studio 2017 #66

Closed VISWESWARAN1998 closed 5 years ago

VISWESWARAN1998 commented 5 years ago

Good Morning, I have built the C++ library using Visual Studio 2017. The build was successful and I have got the tlsh.dll, In my project I have included the header files from include directory. Linked the library files and moved the dll to my project folder. When I rebuilt my project which uses your library I have found an error (Missing header file). Upon inspecting further I see that the error fires on tlsh.h header file on line no: 63. I have found it jumps to the else statement which include "version.h" header file. I can see "win_version.h" header file in windows directory but version.h header file is missing or is it not properly jumping to include "win_version.h"

#ifdef WINDOWS
#include "win_version.h"
#else
#include "version.h"
#endif

Am I missing something? Could you give me some insights and example code to use this project for my C++ application.

Thank you, Visweswaran N

jonjoliver commented 5 years ago

Thanks for your feedback...

If you are compiling with Visual Studio 2017, then this code fragment should

ifdef WINDOWS

include "win_version.h"

else

include "version.h"

endif

load win_version.h Shouldn't it?

I looked at https://stackoverflow.com/questions/3213037/determine-if-linux-or-windows-in-c It suggests the following code fragment

if defined(WIN32) || defined(_WIN32) || defined(WIN32) && !defined(CYGWIN__)

Does this work on a wider range of systems? Jayson P / others: any comments / suggestions?

VISWESWARAN1998 commented 5 years ago

Issue has been solved. Thank you!

jonjoliver commented 5 years ago

So I should check that in?

VISWESWARAN1998 commented 5 years ago

No with some support, it has been solved by adding WINDOWS in my preprocessor definitions.

VISWESWARAN1998 commented 5 years ago

Thank you for your kind help! @jonjoliver

HydraDragonAntivirus commented 8 months ago

Why not pull requesting this?

jonjoliver commented 8 months ago

Hi HydraDragon

I left Trendmicro just over 2 years ago, but it seems that this repo has not been actively maintained. Let me see what my github account is able to do here.

With your comment about Visual Studio. Do you have a proposed fix? Could you generate a pull request and let me see what I can do about either merging in the pull request or finding someone at Trendmicro who can do it (got a lot of friends there).

Cheers jono

HydraDragonAntivirus commented 8 months ago

Okay.