Hi, I am trying to export atexit and puts using wine, I wrote a spec file, libwinecompat.spec with the following:
@ cdecl atexit(ptr) MSVCRT_atexit @ cdecl puts(str) MSVCRT_puts
I build an ar archive with:
winebuild --implib -o libwinecompat.a -E libwinecompat.spec
I am not entirely sure of these things myself, but I am surprised you don't get an error at this point. If you want to export a forward then I htink you'll have to write msvcrt.atexit instead of "MSVCRT_atexit".
However, I recommend loading Wine's msvcrt at runtime with LoadLibrary and retrieving the symbols with GetProcAddress. Otherwise you'll have a mess on your hand to make sure you don't accidentally call the Linux or OSX libc instead.