Xplatforms / J2534_OIP_Wrapper

J2534 Driver and App, Over IP Communication, Wrapper, Emulator, Simulator, Logger and Interruptor
GNU General Public License v3.0
4 stars 3 forks source link

Can't complie with Qt 6.7.1 #20

Open SergArb opened 1 month ago

SergArb commented 1 month ago

Hello, trying to compile with Qt 6.7.1 on Win10 64Bit. First error was:

j2534dllwrapper.cpp:17:44: error: cast from 'J2534DllWrapper*' to 'unsigned int' loses precision [-fpermissive]
   17 |     sprintf(pname, "J2534DllWrapper %08x", (unsigned int)this);

I added "-fpermissive" flag to makefile.

It compiles with lot of warnings. But in the end:

C:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: exports.def:3: syntax error
C:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:exports.def: file format not recognized; treating as linker script
C:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:exports.def:2: syntax error
collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [Makefile.Release:112: ../build/j2534_OverIP.dll] Error 1
mingw32-make[1]: Leaving directory 'D:/Work/J2534/J2534_OIP_Wrapper-main/j2534_OverIP'
mingw32-make: *** [Makefile:45: release] Error 2

What could be wrong? Thank You.

Xplatforms commented 2 weeks ago

Hi, j2534_OverIP_App should be compiled with Qt6 and 64bit, but j2534_OverIP needs to be compiled with Qt5 (5.15.2 for example, last known Qt version with 32bit support) and only as 32bit because all j2534 4.04 PassThru drivers are 32bit DLL's. This is also why the project is separated into GUI and Wrappers parts and all communication is done through IPC.

Xplatforms commented 2 weeks ago

Oh, and exports.def is actually MSVC compiler specific, haven't tried to compile it with mingw, but will work with Qt5 and MSVC 2019 compiler

SergArb commented 2 weeks ago

Thank you for the answer! Tried to compile it with Qt5 and MSVC. It compiles with lot of warnings, but in the end can't find file "cn-cbor.lib". I can't find how to make this lib for Win32.

Xplatforms commented 2 weeks ago

Hi, yes, you need simple CBor library, from here: https://github.com/jimsch/cn-cbor i will link it to project later...