NO

Author Topic: how to link TTF and BMP files into final EXE  (Read 2267 times)

MirekCZ

  • Guest
how to link TTF and BMP files into final EXE
« on: June 04, 2011, 04:10:33 PM »
Hello everybody,
so sorry, beginners question: I made program based on SDL and TTF libs. Perfect and clear way to do it!
But now I would like to "insert all into final.exe" one external font.ttf and couple of bitmaps.bmp
May I use rc? How? And how can I change the source syntax. Many thanks (answer for professional minute- for me one weekend experiment :-))
C code is
Code: [Select]
SDL_test.c[code]g_font = TTF_OpenFont("Smile.ttf", 36);
if((g_ufo = SDL_LoadBMP("ufo001.bmp")) ...
Here is SDL_test.rc
Code: [Select]
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 6.50".
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "SDL_test.h"
LANGUAGE LANG_CZECH,SUBLANG_DEFAULT
BMP_UFO_001 BITMAP "ufo001.bmp"
ICO_ICO ICON "res1.ico"
output:
Code: [Select]
building main_6b.obj.
Building SDL_uceni.exe.
POLINK: fatal error: Invalid machine type in object 'ufo001.bmp'.
*** Error code: 1 ***
Done.
[/code]
« Last Edit: June 04, 2011, 04:32:56 PM by MirekCZ »