Hi,
I try to compile this simple function (see http://www.panda3d.org/manual/index.php/Text_Fonts):
#include "fontPool.h"
#include "staticTextFont.h"
#include "dynamicTextFont.h"
void f() {
PT(TextFont) font=FontPool::load_font("arial.ttf"); // OK
PT(StaticTextFont) sfont=FontPool::load_font("arial.egg");
PT(DynamicTextFont) dFont = FontPool::load_font("arial.ttf");
}
with this command line:
$ g++ -c dyn_text_font.cxx -o dyn_text_font.o -O2 -pthread -msse2 -I/usr/include/python2.7 -I/usr/include/freetype2 -I/usr/include/panda3d
But I got theses errors:
dyn_text_font.cxx: In function 'void f()':
dyn_text_font.cxx:7:58: error: invalid conversion from 'TextFont*' to 'PointerTo<StaticTextFont>::To* {aka StaticTextFont*}' [-fpermissive]
/usr/include/panda3d/pointerTo.I:22:8: error: initializing argument 1 of 'PointerTo<T>::PointerTo(PointerTo<T>::To*) [with T = StaticTextFont, PointerTo<T>::To = StaticTextFont]' [-fpermissive]
dyn_text_font.cxx:8:61: error: invalid conversion from 'TextFont*' to 'PointerTo<DynamicTextFont>::To* {aka DynamicTextFont*}' [-fpermissive]
/usr/include/panda3d/pointerTo.I:22:8: error: initializing argument 1 of 'PointerTo<T>::PointerTo(PointerTo<T>::To*) [with T = DynamicTextFont, PointerTo<T>::To = DynamicTextFont]' [-fpermissive]
Was I’m doing something wrong somewhere, or there is a bug (eventually in the manual)?
OS: Ubuntu 12.04 64bits
GCC: 4.6.3
Panda3D: 1.8.0
Thank you.