Homebrew Failing to compile with FreeTypeGX

loco365

Well-Known Member
OP
Member
Joined
Sep 1, 2010
Messages
5,457
Trophies
0
XP
2,927
So I decided to learn some programming languages as a New Years resolution and I decided to start by using DevKitPro. I am writing a small piece of code and I wanted to use more than just printf commands as you can't do that much with them, so I found FreeTypeGX. I am having the same issue as stated in this thread and I see what is wrong (It's a C++ header and my project is in C). But, I want to extend on that and try to solve that issue. Would I have to convert my project to C++, or is it possible to get a C header for it?

If you need it, here is my makefile process:


Code:
> "make"
pokemondp.ttf
bin2s -a 32 /c/Wii/project1/data/pokemondp.ttf | powerpc-eabi-as -o pokemondp.ttf.o
echo "extern const u8" `(echo pokemondp.ttf | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo pokemondp.ttf | tr . _)`.h
echo "extern const u8" `(echo pokemondp.ttf | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo pokemondp.ttf | tr . _)`.h
echo "extern const u32" `(echo pokemondp.ttf | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo pokemondp.ttf | tr . _)`.h
template.c
In file included from c:/Wii/project1/source/template.c:7:0:
c:/devkitPro/libogc/include/Metaphrasis.h:103:1: error: unknown type name 'class'
c:/devkitPro/libogc/include/Metaphrasis.h:103:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from c:/Wii/project1/source/template.c:8:0:
c:/devkitPro/libogc/include/FreeTypeGX.h:150:15: fatal error: map: No such file or directory
compilation terminated.
make[1]: *** [template.o] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:01

Note: I have a similar thread on the WiiBrew forums, but since this place is far more active, I thought it'd be better to also post it here as I'd be more likely to get a response that I can work with.
 

tueidj

I R Expert
Member
Joined
Jan 8, 2009
Messages
2,569
Trophies
0
Website
Visit site
XP
999
Country
Try renaming your template.c file to template.cpp. That way the C++ compiler will be used (it can build plain C code fine) and it shouldn't complain about the C++ headers.
 

loco365

Well-Known Member
OP
Member
Joined
Sep 1, 2010
Messages
5,457
Trophies
0
XP
2,927
Try renaming your template.c file to template.cpp. That way the C++ compiler will be used (it can build plain C code fine) and it shouldn't complain about the C++ headers.
Ok. I'll give that a try and see what it does.

Ok. Now I have only one error after correcting my makefile.

Code:
> "make" 
pokemondp.ttf
bin2s -a 32 /c/Wii/project1/data/pokemondp.ttf | powerpc-eabi-as -o pokemondp.ttf.o
echo "extern const u8" `(echo pokemondp.ttf | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo pokemondp.ttf | tr . _)`.h
echo "extern const u8" `(echo pokemondp.ttf | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo pokemondp.ttf | tr . _)`.h
echo "extern const u32" `(echo pokemondp.ttf | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo pokemondp.ttf | tr . _)`.h
template.cpp
c:/Wii/project1/source/template.cpp:9:27: fatal error: pokemondp.ttf.h: No such file or directory
compilation terminated.
make[1]: *** [template.o] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:02

I guess I need to fix something? How do I get the font as a .h file?
 

loco365

Well-Known Member
OP
Member
Joined
Sep 1, 2010
Messages
5,457
Trophies
0
XP
2,927
It's just a typo. You should be using "pokemondp_ttf.h" instead.
Thanks for all the help. It's helping, but it produces more and more errors. I think it even wanted me to get rid of the code that inits the GC pad. But, I have tried to just simply clear all the errors. All that now remains between me and a usable file is:

Code:
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/4.6.1/../../../../powerpc-eabi/bin/ld.exe: cannot find -lftimage
If I get lftimage, I should be able to compile. I don't know why this code has so many issues...

And where is lftimage? :confused:
 

loco365

Well-Known Member
OP
Member
Joined
Sep 1, 2010
Messages
5,457
Trophies
0
XP
2,927
I'm still curious as to lftimage and where I can get it. I've searched Google and the only result I can get that I can work with is this thread. And it's already helped me.
 

loco365

Well-Known Member
OP
Member
Joined
Sep 1, 2010
Messages
5,457
Trophies
0
XP
2,927
Awesome. None of those pages appeared on Google results. >_> After rebooting to... uggh... Vista... *shudder*, I added it, but I get the same error. Does ld.exe look in a specific directory for it or does it look all over the devkitpro folder (or libogc for that matter)? I don't know if it's Vista's fault or it's just my code so far. And it's getting the best of me.
 

loco365

Well-Known Member
OP
Member
Joined
Sep 1, 2010
Messages
5,457
Trophies
0
XP
2,927
I still haven't had luck getting it to work. Is there a specific directory it's supposed to be in? It's currently in C:/devkitpro/libogc/lib.

My own computer hates me...
 

loco365

Well-Known Member
OP
Member
Joined
Sep 1, 2010
Messages
5,457
Trophies
0
XP
2,927
So I've pulled out FreeTypeGX and work with libgme for now until I can get it working. Is there any kind of documentation on libgme?

I get this constantly:

Code:
> "make" 
make[1]: *** No rule to make target `Undake30beta.spc.o', needed by `/c/Wii/project1.elf'.  Stop.
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:00
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • realtimesave @ realtimesave:
    @SylverReZ that reminds me that my friend sells CRTs he gets cheap or free for hundreds of dollars. people are dumb
    +1
  • RedColoredStars @ RedColoredStars:
    And is incredibly annoying.
  • realtimesave @ realtimesave:
    man I just washed my shoes and they look exactly the same as before I washed them :|
  • realtimesave @ realtimesave:
    luckily they didn't fall apart
  • RedColoredStars @ RedColoredStars:
    Some CRTs are very much worth the price
  • RedColoredStars @ RedColoredStars:
    i used to go out to the recycling center every couple weeks and look at the crts and other electronics people would drop off. Usually screens were broken or severely scratched from being tossed around. Did find a good one here and there, but never anything like a 1080i widescreen crt.
  • RedColoredStars @ RedColoredStars:
    Or a good contition 40" Sony Trini that weighs 300 lbs. lol
  • RedColoredStars @ RedColoredStars:
    Literally 300 lbs. lolol
  • BigOnYa @ BigOnYa:
    I have a few of those boat anchors in my basement I tried giving away but no one wanted them, So anyone close to Columbus, Ohio area that wants them, (26", 2x 19") please come get, for free.
  • RedColoredStars @ RedColoredStars:
    Dont know anyone wants those smaller ones. Most are after larger sizes and the kinda top of the line models
  • RedColoredStars @ RedColoredStars:
    Motion handling and input lag on those things destroy plasmas, led, oled
  • realtimesave @ realtimesave:
    I had some really nice CRTs I should've kept
  • realtimesave @ realtimesave:
    now I have all lcd
  • realtimesave @ realtimesave:
    one in particular I regret getting rid of oh well :|
  • realtimesave @ realtimesave:
    the Sonys and stuff I don't care about
  • realtimesave @ realtimesave:
    and used LCD are hard to sell I can imagine.. not worth much
  • realtimesave @ realtimesave:
    @SylverReZ where do u lurk
  • a_username_that_isnt_cool @ a_username_that_isnt_cool:
    Is it piracy if it was released for free? Not in my opinion, but I also think it's not piracy if buying it isn't owning it, and it's not piracy if you can't buy it from the original creators anymore.
  • K3Nv2 @ K3Nv2:
    Free release can have loopholes where they still make money through ads
    +1
  • Xdqwerty @ Xdqwerty:
    sigh
  • Xdqwerty @ Xdqwerty:
    @a_username_that_isnt_cool, could you change your username?
  • Xdqwerty @ Xdqwerty:
    i guess not...
  • Xdqwerty @ Xdqwerty:
    yawn
    Xdqwerty @ Xdqwerty: yawn