[Solved] Xfont error in DOS

DOS specific questions.
Post Reply
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

[Solved] Xfont error in DOS

Post by Gablea »

Hi everyone

I hope someone can help

I am getting a error when I run the following command 'fbc -g -exx npos.bas' I get the following
ld: npos.o: in function 'SIGNONPASSWORD_CHANGE_1': c:\npos\NPOS.BAS:321: undefined reference to 'XFONT::INTERFACE::BACKCOLOUR__set__ (unsigned long)'
I am running a PURE DOS machine (FreeDOS 1.3) but in Windows the project complies with no issues

I have re created the xfont library in DOS

can someone tell me what it mean and what I need to do to resolve this issue.

Thanks
Last edited by Gablea on Jun 20, 2023 20:36, edited 3 times in total.
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Xfont error in DOS

Post by St_W »

Sounds like you've declared the function 'XFONT::INTERFACE::BACKCOLOUR__set__ (unsigned long)' and also use it in 'SIGNONPASSWORD_CHANGE_1', but there's no implementation for it. Or at least the linker can't find the implementation.

There could be multiple reasons for this. For example, you could be missing a library or object file while linking. Or the mentioned function is really missing. Or declaration and implementation signatures do not match. .. just to mention a few possibilities.
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: Xfont error in DOS

Post by Gablea »

St_W wrote: Jun 15, 2023 12:23 Sounds like you've declared the function 'XFONT::INTERFACE::BACKCOLOUR__set__ (unsigned long)' and also use it in 'SIGNONPASSWORD_CHANGE_1', but there's no implementation for it. Or at least the linker can't find the implementation.

There could be multiple reasons for this. For example, you could be missing a library or object file while linking. Or the mentioned function is really missing. Or declaration and implementation signatures do not match. .. just to mention a few possibilities.
The same code will compile with no issues at all in Windows and Linux. I had this problem before but I always sorted it by re making the Library with the current version of my fbc and this is Version 1.10.0 (2023-05-14), Built for dos (32bit) (Standalone)

I have done fbc -lib xfont.bas (and it creates a libxfont.a that i have moved to my c:\fbc\dos\lib folder)

Does the xfont library need something that windows / Linux provides?

As I am running a 64 bit version of Windows I can not compile directly on DOS on my PC (I have a Pure FreeDOS development PC that is on my network and that is what I am using to compile)
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: Xfont error in DOS

Post by srvaldez »

hello Gablea
why not make an amalgamation of the code and skip making a library?
I tried it and there's no problem
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: Xfont error in DOS

Post by Gablea »

srvaldez wrote: Jun 19, 2023 18:53 hello Gablea
why not make an amalgamation of the code and skip making a library?
I tried it and there's no problem
I made the new version of the library as the one on the xfont website was complied with 1.07 and it does not work

I read on here as well that it needed re making with 1.10

How would I make a amalgamation (I've not got any clue as what you mean)
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Xfont error in DOS

Post by caseih »

He means just include the files from xfont as part of your source code, rather than linking to it as a library. Then you compile it all together into your binary. No library needed. Might solve some of your problems, or maybe make the problem more plain and easier to solve.

Note that if you're building a proprietary binary you intend to sell, the license of the xfont code may not permit compiling it statically into your own project code. I'm not exactly sure what the xfont library is, or where the source code comes from.
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: Xfont error in DOS

Post by srvaldez »

@caseih and others, xfont website is http://xaviorsoft.freebasic.net/ but has not been active for quite some time, also verybadidea has a github copy here https://github.com/verybadidea/XFont-Lib
license
Copyright (C) 2008-2010 Xaviorsoft Studios.
By Victor Phoa Moentero Leonheart. All rights reserved.

X-Font Library License

-----------------------------------------------------------------------------------------

Disclaimer

This program and library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The author of this program can not be made responsible for any, direct or indirect,
damage caused by the program.


License and costs

X-Font Library is a Freeware for any use. However, You can make a donation
to support development of X-Font. Check on our website:

http://xaviorsoft.freebasic.net

We accept any kind of donation that can imporove our work too, including old Notebook,
PC, Cellphone, gadgets, custom input device, etc.
As long the device is still in a good condition.
You can nicely send to our working camp on:

Jl. Cendrawasih no 12 Ambon 97123 Maluku - Indonesia


If you want to include X-Font Library on any distribution media,
any Internet site then just do it. :)
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: Xfont error in DOS

Post by srvaldez »

@Gablea
here's the amalgamated xfont.bi https://drive.google.com/file/d/1rwFN7I ... sp=sharing
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: Xfont error in DOS

Post by Gablea »

srvaldez wrote: Jun 20, 2023 11:31 @Gablea
here's the amalgamated xfont.bi https://drive.google.com/file/d/1rwFN7I ... sp=sharing
Thank you srvaldez what ever you did worked and my program fully complies now on pure DOS

Thank-you once again
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: [Solved] Xfont error in DOS

Post by srvaldez »

glad it worked :)
badidea
Posts: 2593
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: [Solved] Xfont error in DOS

Post by badidea »

Although I made a copy on github with some some fixes, I don't knot much about the library. But I was wondering if BACKCOLOUR should be BACKCOLOR (without the U).
Post Reply