View previous topic :: View next topic |
Author |
Message |
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Sat Mar 27, 2021 9:09 am Post subject: Linker unresolved references in WIN32. |
|
|
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? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sat Mar 27, 2021 10:22 am Post subject: |
|
|
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. |
|
Back to top |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Sat Mar 27, 2021 11:44 am Post subject: |
|
|
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 |
|
Back to top |
|
|
|