xfont complie error

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
Post Reply
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

xfont complie error

Post by Gablea »

hi all,

I have just updated my windows PC to version 1.6 and I am now getting a build error (as below)
  • C:\FreeBASIC\1.6\fbc -s console "PoS.bas"
    PoS.o:fake:(.text+0x1bfa): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x1c06): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x1c87): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x1c93): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x1d17): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x1d23): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x2c58): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x2c64): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x3008): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x3014): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x3474): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x3480): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x497a): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x4986): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x4a07): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x4a13): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x4a97): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x4aa3): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x4dde): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x4dea): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x519e): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x51aa): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x5c0a): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x5c16): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x5c97): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x5ca3): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0xa4ea): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0xa4f6): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0xa577): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0xa583): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0xc542): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0xc54e): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x14cce): undefined reference to `XFONT::INTERFACE::BACKCOLOR__set__(unsigned long)@8'
    PoS.o:fake:(.text+0x14cda): undefined reference to `XFONT::INTERFACE::FORECOLOR__set__(unsigned long)@8'

    Build error(s)
Any ideas what it means as in 1.5 it compiled with no problem what so ever and it ran fine.
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: xfont complie error

Post by dodicat »

In xfont.bi
changing the four properties to ulong stops the error.
(I have never has any luck with xfont since fb 24)
But it is worth a try.

lines 166 - 169

Code: Select all

Declare Property BackColor  () As ulong
        Declare Property BackColor  (ByVal Expression As ulong)
        Declare Property ForeColor  () As ulong 
        Declare Property ForeColor  (ByVal Expression As ulong) 
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: xfont complie error

Post by Gablea »

Thanks for the tip I shall try that when I get back to the office.

Did something change then between 1.5 and 1.6?
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: xfont complie error

Post by dodicat »

I see in the changelog ,
first line:
Name mangling of Integer/Long parameters was reversed on 32bit to match 64bit.
So, perhaps this could be a cause, but the experts will tell you exactly.
In the lib I see
00003250 T __ZN5XFONT9INTERFACE16BACKCOLOR__get__Ev@4
00003150 T __ZN5XFONT9INTERFACE16BACKCOLOR__set__Ej@8
Which correspond to the get set property in the .bi file in which the set no longer accepts uinteger but doesn't error at ulong.
Anyway you can fiddle around with the .bi file when you finish.
BasicScience
Posts: 489
Joined: Apr 18, 2008 4:09
Location: Los Angeles, CA
Contact:

Re: xfont complie error

Post by BasicScience »

I had the same problem with FB-1.07.1. The error was fixed by recompiling the xfont library.
Post Reply