|
|
Home » U++ Library support » U++ Core » Link problem on linux
Link problem on linux [message #40935] |
Wed, 09 October 2013 23:31 |
Didier
Messages: 683 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 #40949 is a reply to message #40941] |
Fri, 11 October 2013 17:54 |
Didier
Messages: 683 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
|
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 09:23:27 CEST 2024
Total time taken to generate the page: 0.05670 seconds
|
|
|