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 

Unknown symbols in GUI app link
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 91

PostPosted: Tue Apr 04, 2017 10:29 am    Post subject: Unknown symbols in GUI app link Reply with quote

We are porting a GUI Application from 32 bit to 64 bit using ftn95 version 8.10.0. When linking the 64 bit executable it turns out that several symbols are missing, e.g.
    RELEASE_SCREEN_BLOCK@
    RESTORE_SCREEN_BLOCK@
    PCX_TO_SCREEN_BLOCK@
    SCREEN_BLOCK_TO_PCX@
    GET_SCREEN_BLOCK@
    CREATE_SCREEN_BLOCK@
    GET_MOUSE_POSITION@
    RECTANGLE@
    DRAW_TEXT@
    DELETE_POLYGON_DEFINITION@
    POLYLINE@
    FILL_POLYGON@
    CREATE_POLYGON@
    FILL_RECTANGLE@
    GET_MOUSE_BUTTON_PRESS_COUNT@
    TEXT_MODE@
    GET_GRAPHICS_RESOLUTION@
    GET_GRAPHICS_MODES@
    VGA@
    DRAW_LINE@

This did not occur when linking the corresponding 32 bit binary.

Now we tried to get rid of the problems with symbols DRAW_LINE@ and GET_GRAPHICS_MODES@ by adding the lines
Code:

      C_EXTERNAL DRAW_LINE@ "__win_draw_line"(REF,REF,REF,REF,REF)
      C_EXTERNAL GET_GRAPHICS_MODES@ "__win_get_graphics_modes"(REF,REF,
     *REF,REF,REF)

to the code (having had a look into file dbos.ins of the ftn95 installation). We first added these lines to small test examples where it worked ok meaning that we got rid of the missing symbols and had no other symbol missing.

However, when doing the same to our GUI code, we got rid of the symbols DRAW_LINE@ and GET_GRAPHICS_MODES@, but there were two other symbols missing, namely
__WIN_DRAW_LINE and __WIN_GET_GRAPHICS_MODES.

We have no idea, why this happens to our GUI code and not to our small test examples and would be grateful for any hint. Maybe it is the size of the GUI app which is much bigger than the sizes of our test examples.

Now we substituted symbol DRAW_LINE@ by DRAW_LINE_BETWEEN@. This helped in so far that we could display a first polygon with our GUI appplication.

However, we do not know how to proceed with symbol GET_GRAPHICS_MODES@.

We did not yet think about how to proceed with all the other missing symbols mentioned above.

Regards,
Dietmar
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Tue Apr 04, 2017 11:38 am    Post subject: Reply with quote

Dietmar,

There's a whole section in the help file about 'Functions ported from DBOS' under the Clearwin+ general heading. Some of them got straight replacements when FTN77 moved from being a DOS-extended system to being Win32. I was only a boy then, and now I am an old age pensioner! (Well, not quite).

There is also a table of alternative functions.

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


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

PostPosted: Tue Apr 04, 2017 1:30 pm    Post subject: Reply with quote

Most of these routines require the line "include "dbos.ins" when compiling for 64 bits. Let me know if there are any still missing.
Back to top
View user's profile Send private message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 91

PostPosted: Wed Apr 12, 2017 10:31 am    Post subject: Reply with quote

Paul,

my concern was not only the problem that the symbols were missing, but that including DCOM.INS works for some symbols in small examples but does not for the big GUI appication we would like to port.

Following sample works:

Code:

      include <DBOS.INS>
      integer*4 j
     
      j=GET_WKEY1@()
     
      write(*,*) 'GET_WKEY1@: ', j
     
      end


However, including DBOS.INS in the big GUI application still leaves the symbol GET_WKEY1@ undefined in the link step. Do you have any idea why this might happen?

Following symbol is still missing, too: GET_MOUSE_POSITION@
It is not contained in the dbos.ins file.

Regards,
Dietmar
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Apr 12, 2017 11:04 am    Post subject: Reply with quote

Dietmar

You should add "include <dbos.ins>" to every routine that calls get_wkey1@.

I will add GET_MOUSE_POSITION@ to dbos.ins for the next release.

In the meantime you can edit dbos.ins and add

Code:
      C_EXTERNAL GET_MOUSE_POSITION@ "__get_mouse_position"(REF,REF,REF)
Back to top
View user's profile Send private message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 91

PostPosted: Wed Apr 12, 2017 11:18 am    Post subject: Reply with quote

Paul,

I am sorry, but the problem with get_wkey1@ was on my side for I copied the dbos.ins include to the wrong file/routine. Sorry for that.

Regards,
Dietmar
Back to top
View user's profile Send private message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 91

PostPosted: Thu Apr 13, 2017 11:30 am    Post subject: Reply with quote

Paul,

routines set_mouse_bounds@ and set_mouse_position@ are missing, too.
I tried to add lines
Code:
     
      C_EXTERNAL SET_MOUSE_POSITION@ "__set_mouse_position"(REF,REF)     
      C_EXTERNAL SET_MOUSE_BOUNDS@ "__set_mouse_bounds"(REF,REF,REF,REF)

to file DBOS.INS but this did not help but produced the error

The following symbols were not defined:

__set_mouse_position
__set_mouse_bounds

(unless I did not create any error with copying DBOS.INS to the wrong location Smile

Thanks for the information to include DBOS.INS, which helped in several cases.

Regards,
Dietmar
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Apr 13, 2017 12:24 pm    Post subject: Reply with quote

Dietmar

SET_MOUSE_BOUNDS@ is redundant. It no longer does anything. You can comment it out or provide a dummy routine that is empty.

SET_MOUSE_POSITION@ was not being exported by clearwin64.dll. Your interface is correct.

I have added the required export and a new set of DLLs is available for download via...

https://www.dropbox.com/s/xhk4ofgp5g5xcpn/newDLLs6.zip?dl=0
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Thu Apr 13, 2017 3:11 pm    Post subject: Reply with quote

This thread provides food for thought, as clearly Dietmar’s application has its roots in DBOS FTN77, or maybe early Clearwin.

In the helpfile, under ‘Functions ported from DBOS’ a category of functions is listed as ‘Functions which have no operation or are not useful under ClearWin+ but can be left in old programs that have been ported from DBOS’. I’ve never delved far into this section, and when I’ve done so, I initially saw routines that had been superceded. However, on deeper investigation I do see routines that would be useful. For example:
Code:
SET_MOUSE_BOUNDS@

I can see immediate application for that, although in a DBOS context they are screen coordinates, but in a %gr they would be pixels in the region. It isn’t the only one: although one can draw polygons in the Clearwin+ routines, combining them and/or moving them seems a facility worth having.

I can’t see an immediate application for some functions, e.g.
Code:
GET_MOUSE_BUTTON_PRESS_COUNT@

other than as a measure of user impatience or frustration (!), but I’m sure there is a serious application for it. Other routines have clear equivalents in the ordinary set of graphics functions, e.g.
Code:
SET_MOUSE_GRAPHICS_CURSOR@

and they can be considered truly obsolete.

SET_MOUSE_BOUNDS@ in particular does not have an equivalent in the ‘Table of alternative routines’, and I suppose that if it actually does nothing, then my perception of its potential usefulness is sadly wrong. What a pity.

It does occur to me that it would be useful to elevate some of these functions to the ‘Graphics’ section of ‘Clearwin+’ in the helpfile, and to mention the replaced function names as obsolete aliases where appropriate, as that would facilitate someone searching for meaning in old code, and it might be more helpful to retitle ‘Functions ported from DBOS’ to ‘Obsolete functions from pre-Windows graphics’.

More to the point, it would seem useful to reflect on the functions once in DBOS graphics to see what might usefully be re-implemented.

Eddie
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 558

PostPosted: Sun Apr 16, 2017 3:36 am    Post subject: Reply with quote

The on-line version of the documentation is here:
http://silverfrost.com/ftn95-help/clearwinp/dbosfn/helpcontents1.aspx
Unfortunately, the various categories of function are not helpfully marked as intended and explained in the introduction here:
http://silverfrost.com/ftn95-help/clearwinp/dbosfn/introduction.aspx

On my machine at least (Laptop Win7 Home) I only get a 'diamond with a ?' symbol for EVERYTHING !
Is this font related I wanda or some defect n the on-line documentation file ?
(I've mentioned this before as this symbol occurs in many other locations too)
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sun Apr 16, 2017 8:31 am    Post subject: Reply with quote

Don't forget that this particular documentation was written for users porting from (32 bit) DBOS to (32 bit) Windows NT and that was a long long time ago.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 558

PostPosted: Sun Apr 16, 2017 10:39 am    Post subject: Reply with quote

I appreciate that Paul, I only mention it in the context of Eddie's suggestios above.

I seem to remember that the 'diamonf question mark' character appears elsewhere also, not just in the DBOS dcument.

While I'm here, remind me please where I can find the Clearwin+ SUPPLEMENT which I keep coming across references to.
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Sun Apr 16, 2017 10:49 am    Post subject: Reply with quote

What happened to my post?

John, get your copy here: http://www.silverfrost.com/manuals/clearwin.pdf

Symbols are missing because of the fonts on your PC - they may show in the document.

Eddie
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 558

PostPosted: Mon Apr 17, 2017 8:03 am    Post subject: Reply with quote

Ahhhh, so the 'supplement ' is the just the 'old' Clearwin Fortran Edition' User Guide, the first document.
I printed (yes I still print things, I'll just plant a tree every 5 years rather than read the 'save our plant/trees/etc... nags on emails - much more efficient)), it's often easier to plough through piles of post-it tabbed pages than use the devil's search engines Smile ) and read through (very useful for a global overview) at the beginning of my FTN95 adventure.
In some ways in some aspects more useful than the on-line or
I was thinking the references were to a seperate document entitled 'ClearWin+ Supplement !

Thanks Eddie.
Back to top
View user's profile Send private message
simon



Joined: 05 Jul 2006
Posts: 144

PostPosted: Mon Apr 17, 2017 3:02 pm    Post subject: Reply with quote

There is this document too John:

C:\Program Files (x86)\Silverfrost\FTN95\doc\cwplus.enh
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 -> 64-bit All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
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