Silverfrost Forums

Welcome to our forums

Error using DLL (Compile)

28 Feb 2024 10:23 #31166

I get the following error when attempting to compile a routine in 64-bit mode with a DLL created using MINGW64.

*** Error 902: Unable to read size of import symbols from F:\cmasterf95\RELEASE\WIN64\dxflib_dll_normal_64.dll.

Link to the 64-bit DLL is: https://www.dropbox.com/scl/fi/dz4lwx6vb1za7w4bq2sh0/dxflib_dll_normal_64.dll?rlkey=44jvtn6utv1zstk533c9p3n8w&dl=0

There may be a compile/library flag that is not being set properly when I compile and create the DLL. The batch file that does it is (in part):

g++.exe -c 'Z:\CMASTERF95\dxflib_dll\src\dl_writer_ascii.cpp' -g -m64 -o build-Release\src_dl_writer_ascii_64.cpp.o -I. -I. g++.exe -c 'Z:\CMASTERF95\dxflib_dll\src\dl_dxf.cpp' -g -m64 -o build-Release\src_dl_dxf_64.cpp.o -I. -I. g++.exe -c 'Z:\CMASTERF95\dxflib_dll\src\dxf_interface_ftn95.cpp' -g -m64 -o build-Release\src_dxf_interface_ftn95_64.cpp.o -I. -I. g++.exe -shared -fPIC -o build-Release\lib\dxflib_dll_normal_64.dll build-Release\src_dl_writer_ascii_64.cpp.o build-Release\src_dl_dxf_64.cpp.o build-Release\src_dxf_interface_ftn95_64.cpp.o -L.\lib -O2 -m64

Any insight into what I might do next would be helpful.

I had to resort to the MINGW64 C++ compiler because the code I'm using does things like

#include <limits>

rather than

#include <limits.h>

Without changing the code files for this kind of difference, SCC will not compile the files. Unless there is a flag I am unaware of.

29 Feb 2024 9:08 #31170

Bill

There does not appear to be a flag for SCC that allows for <limits>.

Have you considered using an IDE and 'Replace in files' to replace <limits> by <limits.h>? Plato has this feature.

29 Feb 2024 6:59 #31174

I was not using Plato, however this is an alternative that I'll try.

29 Feb 2024 7:19 #31175

Update: The error message was due to the DLL import is not required for /64.

Please login to reply.