Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Link problem on linux
Link problem on linux [message #40935] Wed, 09 October 2013 23:31 Go to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hi,

A link problem has been introduced recently with the addition of fonts.
On my linux i get the following error :
Quote:

..../upp.out/MyApps/CtrlCore/GCC.Blitz.Gui.Shared.Sse2/DrawT extX11.o: In function `_GLOBAL__sub_I__ZN3Upp13gtk_antialiasE':
DrawTextX11.cpp:(.text.startup._GLOBAL__sub_I__ZN3Upp13gtk_a ntialiasE+0x86): undefined reference to `Upp::GetFontInfoSysXft'
DrawTextX11.cpp:(.text.startup._GLOBAL__sub_I__ZN3Upp13gtk_a ntialiasE+0x90): undefined reference to `Upp::GetGlyphInfoSysXft'



When looking at the code all seems right : the variables are instanciated :
Quote:

uppsrc/Draw/FontFc.cpp(144):CommonFontInfo (*GetFontInfoSysXft)(Font font);


And extern is used to tell these vars are available in another section.

The following question comes to my mind : "extern xxx;" is a C syntax, is it allowed in C++ ????

[Updated on: Wed, 09 October 2013 23:32]

Report message to a moderator

Re: Link problem on linux [message #40938 is a reply to message #40935] Thu, 10 October 2013 10:48 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Are you sure you have Draw package in the project?
Re: Link problem on linux [message #40939 is a reply to message #40938] Thu, 10 October 2013 22:14 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hi mirek,

Unfortunantly yes Sad
I wish it was so simple.

There is probably a conditionnal include problem.
I'll look into it now

Here is what I get when I compile Draw01 tutorial
Quote:

----- CtrlLib ( GUI GCC SHARED BLITZ LINUX POSIX ) (1 / 9)
----- CtrlCore ( GUI GCC SHARED BLITZ LINUX POSIX ) (2 / 9)
----- PdfDraw ( GUI GCC SHARED BLITZ LINUX POSIX ) (3 / 9)
----- Draw ( GUI GCC SHARED BLITZ LINUX POSIX ) (4 / 9)
----- plugin/bmp ( GUI GCC SHARED BLITZ LINUX POSIX ) (5 / 9)
----- RichText ( GUI GCC SHARED BLITZ LINUX POSIX ) (6 / 9)
----- Core ( GUI GCC SHARED BLITZ LINUX POSIX ) (7 / 9)
----- plugin/png ( GUI GCC SHARED BLITZ LINUX POSIX ) (8 / 9)
----- Draw01 ( GUI MAIN GCC SHARED BLITZ LINUX POSIX ) (9 / 9)
Linking...
/users/didier/upp.out/tutorial/CtrlCore/GCC.Blitz.Gui.Shared /$blitz.o: In function `_GLOBAL__sub_I__ZN3Upp11ImageBufferC2ERNS_9ImageDrawE':
$blitz.cpp:(.text.startup._GLOBAL__sub_I__ZN3Upp11ImageBuffe rC2ERNS_9ImageDrawE+0x367): undefined reference to `Upp::GetFontInfoSysXft'
$blitz.cpp:(.text.startup._GLOBAL__sub_I__ZN3Upp11ImageBuffe rC2ERNS_9ImageDrawE+0x371): undefined reference to `Upp::GetGlyphInfoSysXft'
/users/didier/upp.out/tutorial/Draw/GCC.Blitz.Gui.Shared/$bl itz.o: In function `Upp::Font::GetData() const':
$blitz.cpp:(.text._ZNK3Upp4Font7GetDataEv+0x14): undefined reference to `Upp::GetFontDataSys(Upp::Font)'
/users/didier/upp.out/tutorial/Draw/GCC.Blitz.Gui.Shared/$bl itz.o: In function `Upp::Font::List()':
$blitz.cpp:(.text._ZN3Upp4Font4ListEv+0x87): undefined reference to `Upp::GetAllFacesSys()'
/users/didier/upp.out/tutorial/Draw/GCC.Blitz.Gui.Shared/$bl itz.o: In function `Upp::Font::InitStdFont()':
$blitz.cpp:(.text._ZN3Upp4Font11InitStdFontEv+0x61): undefined reference to `Upp::GetStdFontSys(Upp::String&, int&)'
/users/didier/upp.out/tutorial/Draw/GCC.Blitz.Gui.Shared/$bl itz.o: In function `Upp::GetFontInfo(Upp::Font)':
$blitz.cpp:(.text._ZN3Upp11GetFontInfoENS_4FontE+0x65): undefined reference to `Upp::GetFontInfoSys(Upp::Font)'
/users/didier/upp.out/tutorial/Draw/GCC.Blitz.Gui.Shared/$bl itz.o: In function `Upp::IsNormal(Upp::Font, int)':
$blitz.cpp:(.text._ZN3Upp8IsNormalENS_4FontEi+0x82): undefined reference to `Upp::GetGlyphInfoSys(Upp::Font, int)'
/users/didier/upp.out/tutorial/Draw/GCC.Blitz.Gui.Shared/$bl itz.o: In function `Upp::GetGlyphEntry(Upp::Font, int, unsigned int)':
$blitz.cpp:(.text._ZN3Upp13GetGlyphEntryENS_4FontEij+0xf7): undefined reference to `Upp::GetGlyphInfoSys(Upp::Font, int)'
/users/didier/upp.out/tutorial/CtrlLib/GCC.Blitz.Gui.Shared/ ChGtk.o: In function `Upp::ChHostSkin()':
ChGtk.cpp:(.text._ZN3Upp10ChHostSkinEv+0x545): undefined reference to `Upp::ClearFtFaceCache()'
ChGtk.cpp:(.text._ZN3Upp10ChHostSkinEv+0x402d): undefined reference to `Upp::ClearFtFaceCache()'
collect2: error: ld returned 1 exit status

There were errors. (0:00.84)


Re: Link problem on linux [message #40940 is a reply to message #40939] Thu, 10 October 2013 23:16 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
OK I found what is wrong,

the flag CUSTOM_FONTSYS is present in the main.conf.h

BUT .....

If I remove it, it just comes back again.
TheIDE just adds it automatically again and again

This flag was being added by the plugin/FT_fontsys package (I had added it to my project last WE just to try and completelly forgot about it !!!)

==> the conclusion is : plugin/FT_fontsys does not work on linux
Re: Link problem on linux [message #40941 is a reply to message #40940] Fri, 11 October 2013 08:29 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Didier wrote on Thu, 10 October 2013 17:16

OK I found what is wrong,

the flag CUSTOM_FONTSYS is present in the main.conf.h

BUT .....

If I remove it, it just comes back again.
TheIDE just adds it automatically again and again

This flag was being added by the plugin/FT_fontsys package (I had added it to my project last WE just to try and completelly forgot about it !!!)

==> the conclusion is : plugin/FT_fontsys does not work on linux


That is sort of weird, as I am compiling it several times a day, working on SDL/OpenGL backend... but will check it.

Mirek
Re: Link problem on linux [message #40949 is a reply to message #40941] Fri, 11 October 2013 17:54 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
I've just done a simple test:
Added plugin/FT_fontsys to Draw01 tutorial, did a complete rebuild and got the following errors:

Quote:

MD5.cpp
SHA1.cpp
----- plugin/png ( GUI GCC SHARED BLITZ LINUX POSIX ) (9 / 10)
pnglib.c
pngupp.cpp
pngreg.icpp
----- Draw01 ( GUI MAIN GCC SHARED BLITZ LINUX POSIX ) (10 / 10)
main.cpp
Core: 55 file(s) built in (0:00.61), 11 msecs / file, duration = 2544 msecs, parallelization 100%
plugin/png: 3 file(s) built in (0:00.02), 7 msecs / file, duration = 359 msecs, parallelization 100%
Draw01: 1 file(s) built in (0:00.18), 188 msecs / file, duration = 416 msecs, parallelization 47%
Linking...
/users/didier/upp.out/tutorial/CtrlCore/GCC.Blitz.Gui.Shared /$blitz.o: In function `_GLOBAL__sub_I__ZN3Upp11ImageBufferC2ERNS_9ImageDrawE':
$blitz.cpp:(.text.startup._GLOBAL__sub_I__ZN3Upp11ImageBuffe rC2ERNS_9ImageDrawE+0x367): undefined reference to `Upp::GetFontInfoSysXft'
$blitz.cpp:(.text.startup._GLOBAL__sub_I__ZN3Upp11ImageBuffe rC2ERNS_9ImageDrawE+0x371): undefined reference to `Upp::GetGlyphInfoSysXft'
collect2: error: ld returned 1 exit status




I verified that the main.conf.h file for Draw01 contained : #define CUSTOM_FONTSYS

==> I'm back to my original question: is "extern xxxx" really accepted in C++ ??? or is my GCC doing me some nasty tricks ???


My GCC is the following :
Quote:

[didier@localhost ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.7.2 /lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --disable-build-with-cxx --disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lt o --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.7.2 20120921 (Red Hat 4.7.2-2) (GCC)



[Updated on: Fri, 11 October 2013 17:55]

Report message to a moderator

Re: Link problem on linux [message #40950 is a reply to message #40949] Fri, 11 October 2013 18:24 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
OK, now I understand the problem: FT_FontSys replaces font handling in Draw, but CtrlCore with GTK or X11 backend requests some specific routines linking it to Xft. Which means you cannot use FT_FontSys with GTK nor X11 backend...
Re: Link problem on linux [message #40965 is a reply to message #40950] Mon, 14 October 2013 22:04 Go to previous message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
OK thank's for the reply
Previous Topic: Binary file to JSON
Next Topic: Algo.h rev6429 small bug
Goto Forum:
  


Current Time: Fri Apr 19 13:11:00 CEST 2024

Total time taken to generate the page: 0.03829 seconds