79405063

Date: 2025-02-01 13:32:58
Score: 1
Natty:
Report link

Solution The issue was identified using dumpbin (command : dumpbin /headers libbid.lib), which revealed that nmake had built the Intel library as a 32-bit binary. Since my PC is 64-bit and the TWS API source is likely optimized for 64-bit, this mismatch caused the problem. Here’s how to resolve it:

Steps to fix Switch to 64-bit Mode in Visual Studio Open the Developer Command Prompt for Visual Studio and run the following command:

call "C:\Program Files\Microsoft Visual Studio...\Build\vcvars64.bat" This ensures that you are working in 64-bit mode. ...\ in the directory adress are here because it depends of the used version of visual studio (mine is 2022 community).

Rebuild the Library in 64-bit Use nmake to rebuild the library with the required configuration. Run the following command in the directory containing the makefile.mak:

nmake -f makefile.mak CC=cl CALL_BY_REF=0 GLOBAL_RND=0 GLOBAL_FLAGS=0 UNCHANGED_BINARY_FLAGS=0 Replace the Existing Library Once the library has been rebuilt as a 64-bit binary, replace the old 32-bit version in your repository with the newly generated library file.

Rebuild Your Project After updating the library, rebuild your project. The build errors should now be resolved

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: EducatedGoat