fenugrec / freediag

OBD2 scantool
GNU General Public License v3.0
338 stars 75 forks source link

Compile source tree with Visual Studio 2017 (toolset v141, v141_xp) #73

Closed cfehse closed 3 years ago

cfehse commented 3 years ago

Scope

The scope of this PR is to make the source tree configure/compile with Visual Studio 2017 - especially the toolsets v141, v141_xp to be able to create Windows XP binaries with a Microsoft compiler. This MSVC version 19.1 compiler provide the required c99 support to build the sources. Additional c11 features may break this compiler version (like the Embarcadero compiler) but because the changes were minor I find it worth to add the support to the source tree,

What has changed?

Source Files:

CMakeLists.txt scantool/diag.h

doc/build_system.txt

scantool\freediag.rc scantool\diag_test.rc

scantool/diag_l0_sim.c

Tested Environments:

All changes where tested using these environments:

Cppcheck:

Compiler/Build Environment:

Perhaps you like the changes and accept this merge request.

Thanks!

@fenugrec

fenugrec commented 3 years ago
* Changed the declaration of the `sim_send()` function to match the implementation

! Indeed, how did I miss that for so long ? none of our tools (gcc since v7, cppcheck, etc) signaled that inconsistency... and I have -Wall -Wextra etc. since forever. Weird.

The rest also looks good, will merge "soon"

cfehse commented 3 years ago

none of our tools (gcc since v7, cppcheck, etc) signaled that inconsistency...

And our for the time being last compiler coming in the next PR (clang on Linux) did not find this declaration mismatch worth mentioning either.

fenugrec commented 3 years ago

merged, thanks !