Silverfrost Forums

Welcome to our forums

Linker unresolved references in WIN32.

27 Mar 2021 8:09 #27344

There are several routines which I have been using since the mid 1990s. Re-compiling programes containing them fails in the 32 bit version, but succeeds in the 64 bit version. Some of these programs use Real*10 and therefore will not work in 64bit version as this is not provided.

This simple program links in 64bit but has missing symbols in 32bit. There are other unresolved references in my real program, but I think this is a related issue.

winapp program dbostest include <dbos.ins> call new_page@ end

I'm not expecting it to run I was only looking for the linker unresolved references.

64 bit: Compiling file: Dbostest.for Compilation completed with no errors. Linking... Creating executable file C:\Users\Ian\Documents\Projects\Debug\x64\dbostest.exe Linking completed.

32 bit: Compiling file: Dbostest.for Compilation completed with no errors. Linking... WARNING the following symbols are missing: __win_new_page C:\Users\Ian\Documents\Projects\Debug\Win32\Dbostest.obj (C:\USERS\IAN\DOCUMENTS\PROJECTS\DBOSTEST.FOR) Creating executable: Debug\Win32\dbostest.exe Linking completed.

All dlls dated 17/11/2020.

What am I doing wrong?

27 Mar 2021 9:22 #27345

Ian

include <dbos.ins> will not work for 32 bits.

You could use conditional compilation via CIF or #ifdef.

_WIN32 is 'true' for 32 bits whilst _WIN64 is 'true' for 64 bits.

So...

CIF _WIN64 include <dbos.ins> CENDIF

with /fpp on the FTN95 command line.

27 Mar 2021 10:44 #27346

OK. So what you actually meant was that 'INCLUDE <DBOS.INS>' is not required for WIN32 and the linking will be sucessful without it. It is only the WIN64 that requires it. Using the CIF allows only one copy of the code to be maintained and will then work for both WIN32 & WIN64.

Thanks, that makes sense now. Ian

Please login to reply.