Including tlse.c when using VS 2002 compiler, gives this error
As per the usage part, it shows as follows.
You just #include "tlse.c" in your code. Everything is a single file.
However by including the tlse.c, compiler gives 161 errors.
Error (active) E0337 linkage specification is incompatible with previous "crypt_argchk" (declared at line 12953 of "libtomcrypt.c") libtomcrypt.c 17022
Hello,
I've tested with both gcc and clang, everything seems ok. What compiler (and version) are you using?
Also, please provide full info when opening an issue, in order to be able to check it.
You can also use the standard libtomcrypt library (recommended), and include tlse.h and and tlse.c to your project. I don't think "wrong usage is given" is the best decription for this issue. You could try something like this: "Including tlse.c when using X compiler, gives this error" :)
Also, it is possible to you had included tlse.c or libtomcrypt.c more than once (maybe in different source files). If this is the case, please add tlse.c to your project and just include tlse.h without defining TLSE_AMALGAMATION.
E.
Hello Sir,
Please see the details given below. Windows 10 Visual studio 2022 Followed to the usage section and added tlse.c in to newly created windows project. We can add tlse.h in to our source and compiling. Works file.
However, adding tlse.c gives the mentioned error. I can send you the screen shot of the error.
I like this product. Trying to explore more on this and how to make use of it in my project.
Ok, I've tested with VS2022, seems that it compiles libtomcrypt.c with the C++ compiler instead of C compiler (or using C++ rules on C code). It is just frustrating that Microsoft forces C++ compiler rules on C code. You should compile the standard tomcrypt library, then include tlse.c to your project. Use "extern "C" before including tlse.c. However, on the libtomcrypt.c side, I cannot help you. It is just a mess with the MS C/C++ compiler. tlse.c seems to be compiling just fine, but libtomcrypt.c ... it's another story.
I recommend compiling tomcrypt and adding it to your project, instead of using libtomcrypt. If tomcrypt compiles using VS2022, then TLSe should compile just fine.
Hope it helps, Eduard
Thank you for your time and support.
Just sharing on what i was able to do.
Build the tlse.lib.
tlse.h was added to my project and linked with tlse.lib.
There was a small name conflict with one enum. Which i modified slightly and works fine.