im trying to compile essnac-ng library from github with msvc2017 to use in an already existing qt-Project.
I managed to compile it using msys2 (with make, autoconf, automake, yacc, bison) and powershell:
cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 `& powershell
cd D:\Projekte\esnacc-ng
bash ./boot.sh
bash ./configure LD=linker.exe
make
make install
Problem 1: it is only compiling the static libraries with the following warning during make:
warning: undefined symbols not allowed in x86_64-pc-msys shared libraries; building static only
after trying what this thread here says: libtool: undefined symbols not allowed in i686-pc-mingw32 shared i get an error during make:
cl : Befehlszeile error D8021 : Ungültiges numerisches Argument /Wl,-DLL,-IMPLIB:cxx-lib/.libs/cxxasn1.dll.lib.
make[1]: *** [Makefile:1641: cxx-lib/libcxxasn1.la] Error 2
make[1]: Leaving directory '/d/Projekte/esnacc-ng'
make: *** [Makefile:1370: all] Error 2
PS D:\Projekte\esnacc-ng>
Problem 2: Trying to use the static library like this in my pri file:
LIBS += -L$$PWD/cxx-lib/libs/ -lcxxasn1
LIBS += -L$$PWD/cxx-lib/libs/ -lcxxasn1rose
INCLUDEPATH += $$PWD
INCLUDEPATH += $$PWD/cxx-lib/inc
HEADERS += $$PWD/MyAsnFile.h
SOURCES += $$PWD/MyAsnFile.cpp
QMAKE_CFLAGS_MT+=$$PWD/cxx-lib/inc
QMAKE_CXXFLAGS_MT+=$$PWD/cxx-lib/inc
#QMAKE_CFLAGS_RELEASE += /MD
DISTFILES += \
$$PWD/cxx-lib/inc/snacc.h.in
i get the Error during compilation:
Fehler: LNK2038: Konflikt ermittelt für "RuntimeLibrary": Der Wert "MT_StaticRelease" stimmt nicht mit dem Wert "MD_DynamicRelease" in main.obj überein.
I saw this thread here but am not sure on how to convert it into something useful for myself: LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in file.obj