nissutils icon indicating copy to clipboard operation
nissutils copied to clipboard

MSYS2 (MINGWS64) build issues

Open nistunedev opened this issue 2 years ago • 5 comments

Build issues from g++.exe (Rev4, Built by MSYS2 project) 12.2.0 when using Nislib as part of a C++ project

cli_utils/md5/md5.c -#include <md5.h> +#include "md5.h"

nislib.c (Line 207) error: expected primary-expression before 'xor' token

nistunedev avatar Nov 05 '22 06:11 nistunedev

yeah, you can't always just compile C code as C++.

If you want to use nissutils from a c++ app you may need to add some extern C { ... directives

fenugrec avatar Nov 05 '22 23:11 fenugrec

First error also happens if building using the standard makefile using just gcc (same version 12.2.0) inside MSYS/MINGW. I ended up taking the bits I needed from nislib and compiling into a static library and linking that in for now

nistunedev avatar Nov 05 '22 23:11 nistunedev

any reason you're not adapting the cmake files ? cmake should add the correct -I... gcc flags automatically , regardless of platform + compiler combo

fenugrec avatar Nov 05 '22 23:11 fenugrec

BTW, I'm glad you find nisprog + npkern + nissutils useful in your software, but remember it's GPL-licensed which has certain restrictions and requirements regarding using modified source code.

fenugrec avatar Nov 06 '22 00:11 fenugrec

Thanks. Will look into cmake. Using this the functions to decode later CAN DAT files in a standalone utility. Aware of GPL restrictions and no parts used in commercial software.

nistunedev avatar Nov 06 '22 00:11 nistunedev