Compilation problem with libretro library

Hi all, I have made a libretro core for me and my friend. A bomberman playable at 16 players, multi player over internet (1-16 players on 1-16 raspberry pi / linux / mac). Some of my friend run retroarch on windows and i have some trouble to compile it for this platform. On mac OS X , i compile and run it with ./retroarch -L core.dylib -> no problem, Ubuntu, fedora, retropie (raspbian) no problem to compile and run. On windows with codeBlocks i succeded to compile. But if i try to launch the core with retroarch.exe -L core.dll --verbose i have this line Error unknown 193 and nothing is loaded. On windows i compile with mingw32 i used SDL2, SDL2image, SDL2mixer, SDL2ttf, SDL2_net library in my project. What is the best way to compile a core with libretro library ? Someone can take a look inside my project and help me with makefile, i think the best is to made it by cross compilation. Thank’s alexis-puska

EDIT : i have found how to compile in cross compilation, but i have a last problem. on Ubuntu/fedora/raspbian/mac os, no problems to compile and execute the core. In windows i get this error :

retroarch.exe -L cores/lr_multi_bomberman_libretro.dll

C:\Users\alexis\Desktop\retroarch>RetroArch [INFO] :: Loading dynamic libretro c ore from: “C:\Users\alexis\Desktop\retroarch\cores\lr_multi_bomberman_libretro.d ll” RetroArch [ERROR] :: Failed to load symbol: “retro_init” RetroArch [ERROR] :: Fatal error received in: “init_libretro_sym()” RetroArch [ERROR] :: This core requires a content file.

Did you have a idea of this problem ?

My github repository : https://github.com/alexis-puska/lr-multi-bomberman/

Maybe linker pb try to add the link.t directive at the end of your link cmd.

hi, thanks to reply, but how can i made that ? i’m not a pro of C++ development

Grab link.t from one of the libretro core and add -Wl,-version-script=link.T at the end after extraldflags.

No change, same error. I depress…

last resort you should try this at the end. -Wl,–export-all-symbols -shared -Wl,–no-undefined -Wl,–version-script=link.T

With -Wl,–export-all-symbols -Wl,–version-script=link.T

The linker made the DLL, retrorch load the DLL but crash on windows, i don’t know why… i look it tomorrow, thank’s for this help. I someone on windows will won this challenge ;p you can !

3 day later, 3 errors different, and nothing works with windows compilation / cross compilation. error 193, error 998, or not found retro_init.

Can someone take a look inside the Makefile.libretro or Makefile.libretro.crosscompilation ? i can’t make a makefile to create this windows version.

Help !

I’ll try to look into it this evening.

I didn’t realize at first that this is an entirely new core!

yes it’s a game core. a bomberman multi player.

i’ve try with mxe to compile it, but i get only error 998 from retroarch. i have things and i have try to recompile a existing core works on windows by cross compilation. no compilation error but the same error 998 at execution, i can’t found how core to windows was made. Someone can telle me how ?

I typically cross-compile from linux but the buildbot uses the msys2 toolchain to build the cores. This guide can help you get set up: https://buildbot.libretro.com/docs/compilation/windows/

with msys on windows, the static link failed… harfbuzz has many undefined reference, i have add the pkg-confg --static --libs for harfbuzz, but nothing change

C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-ft.o):(.text+0xae7): undefined reference to FT_Get_MM_Var' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-ft.o):(.text+0xb5c): undefined reference toFT_Get_Var_Blend_Coordinates’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-ft.o):(.text+0xda1): undefined reference to FT_Set_Var_Blend_Coordinates' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x15f): undefined reference to_imp__gr_make_face’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x1f4): undefined reference to _imp__gr_face_destroy' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x398): undefined reference to_imp__gr_face_featureval_for_lang’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x3b0): undefined reference to _imp__gr_face_find_fref' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x3e7): undefined reference to_imp__gr_fref_set_feature_value’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x4a5): undefined reference to _imp__gr_make_seg' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x4be): undefined reference to_imp__gr_seg_n_slots’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x563): undefined reference to _imp__gr_featureval_destroy' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x570): undefined reference to_imp__gr_seg_destroy’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x592): undefined reference to _imp__gr_featureval_destroy' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x59f): undefined reference to_imp__gr_seg_destroy’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x65b): undefined reference to _imp__gr_seg_first_slot' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x669): undefined reference to_imp__gr_slot_next_in_segment’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x68c): undefined reference to _imp__gr_slot_origin_X' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x69d): undefined reference to_imp__gr_slot_before’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x6a8): undefined reference to _imp__gr_slot_after' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x6b5): undefined reference to_imp__gr_slot_gid’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x725): undefined reference to _imp__gr_slot_can_insert_before' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x7ae): undefined reference to_imp__gr_slot_origin_X’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x833): undefined reference to _imp__gr_seg_advance_X' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x964): undefined reference to_imp__gr_seg_first_slot’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x973): undefined reference to _imp__gr_slot_origin_X' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x987): undefined reference to_imp__gr_slot_next_in_segment’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x994): undefined reference to _imp__gr_slot_origin_Y' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0x99d): undefined reference to_imp__gr_slot_advance_Y’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xb4a): undefined reference to _imp__gr_seg_advance_X' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xb5b): undefined reference to_imp__gr_seg_first_slot’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xb6a): undefined reference to _imp__gr_slot_origin_X' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xb87): undefined reference to_imp__gr_slot_next_in_segment’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xb90): undefined reference to _imp__gr_slot_origin_Y' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xb99): undefined reference to_imp__gr_slot_advance_Y’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xccd): undefined reference to _imp__gr_featureval_destroy' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xcda): undefined reference to_imp__gr_seg_destroy’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xd17): undefined reference to _imp__gr_featureval_destroy' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xd2b): undefined reference to_imp__gr_seg_first_slot’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xd33): undefined reference to _imp__gr_slot_origin_X' C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xd53): undefined reference to_imp__gr_seg_first_slot’ C:/msys64/mingw32/lib\libharfbuzz.a(libharfbuzz_la-hb-graphite2.o):(.text+0xd65): undefined reference to `_imp__gr_seg_advance_X’ v

after this lot of failed, i take 2048_libretro and build it with cross compilation and native on windows, i have the same result. error 998. i d’ont know how you compile the windows DLL… but with msys it’s doesn’t work.