Configure PLplot for Borland Turbo C++ Explorer Edition (free IDE and compiler)
Everything is pretty much as with Borland C++ 5.5, the only thing that's needs change are lines in <plplot install dir>\CMakeLists.txt (line numbers are given according to plplot5.7.3).
Comment this out:
line77-> # Borland Compiler must compile in ANSII mode line78-> if(BORLAND) line79-> ADD_DEFINITIONS(-A) line80-> endif(BORLAND)
I.e. lines above should look like:
# Borland Compiler must compile in ANSII mode #if(BORLAND) # ADD_DEFINITIONS(-A) #endif(BORLAND)
The reason for this is, that '-A' flag forces ASCII compile mode, which results in compiler errors when processing winnt.h (it uses some Borland special extensions like '_EDX' register names) and winreg.h. Also it fails on some source .c files because of single-line comments starting with '//'.
I understand that commenting out something in CMakeLists.txt is hack-like thing, but this option cannot be configured usual way, because the commented lines add '-A' to compiler command line after all other flags have been added, so putting '-AT' or '-A-' in CMAKE_C_FLAGS doesn't help.