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 

GetDC etc

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



Joined: 23 Aug 2005
Posts: 2042
Location: Yateley, Hants, UK

PostPosted: Mon Apr 15, 2019 2:04 pm    Post subject: GetDC etc Reply with quote

I'm racking my brains for an answer to this one. Recompiling and linking a rather long program not recompiled since 2015 causes FTN95 to declare the routines GetDC and GetDeviceCaps missing at link time (WARNING The following symbols are missing), and if the resulting EXE is run, it fails with a missing_GetDC@4.

Rather oddly, if I make up a demonstrator:

Code:
        OPTIONS (INTL)
        PROGRAM DC
        INCLUDE <WINDOWS.INS>
        iHDC  = GetDc (0)         ! Monitor / Windows system
        ixdpi = GetDeviceCaps (iHDC, LOGPIXELSX)
        iydpi = GetDeviceCaps (iHDC, LOGPIXELSY)
        WRITE(*,*) iHDC, ixdpi, iydpi
        END


then it all works fine. I've checked in the long program that the INCLUDE is there, and indeed, the demonstrator is simply lines copied from the big program.

Using 32 bit and 8.40PE (also tried 8.30PE).

Any ideas that I could try?

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Apr 15, 2019 3:07 pm    Post subject: Reply with quote

Eddie

See if you can get a clue from a linker MAP file. The interfaces are

Code:
      STDCALL GETDC 'GetDC' (VAL):INTEGER(7)
      STDCALL GETDEVICECAPS 'GetDeviceCaps' (VAL,VAL):INTEGER*4


so you will be looking for GETDC and GetDC etc.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2042
Location: Yateley, Hants, UK

PostPosted: Mon Apr 15, 2019 3:34 pm    Post subject: Reply with quote

Hi Paul,

Tried that and it reported GetDeviceCaps missing. Recompiled files where GetDeviceCaps is mentioned: same problem. Recompiled everything (I've done that before, more than once, just in case the issue is files compiled with a previous version), relinked - and problem gone.

Bizarre.

I'd forgotten /MAP, but it is useful.

Thanks

Edded
Back to top
View user's profile Send private message
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