forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Linker unresolved references in WIN32.

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Sat Mar 27, 2021 9:09 am    Post subject: Linker unresolved references in WIN32. Reply with quote

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
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Mar 27, 2021 10:22 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Sat Mar 27, 2021 11:44 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group