1. Orx Wrapper Update
- Posted by Icy_Viking Aug 11, 2021
- 1057 views
Hello all,
So after downloading Orx from source and compiling it. I have made it so the DLL using the CDECL calling option. So now I can use it make a wrapper for Euphoria using 32-bits instead of having to rely on 64-bits. Granted there still may be some hurdles when it comes to the inline functions. However those may be able to be done using ifdef statements in Euphoria.
I was able to compile it using CDECL by changing a line in the orxDecl.h file. After I did a quick test, I no longer got any errors when trying to call functions from the DLL. Now to continue writing the wrapper.
3. Re: Orx Wrapper Update
- Posted by Icy_Viking Aug 13, 2021
- 972 views
For anyone wondering how I got it to compile using CDECL, I only had to change one line of code. I compiled using Visual Studio 2017 x86 under Windows 7(64-bit). I should probably upgrade to Win 10 sometime so I can have access to the Linux Subsystem.
// C Code /* Windows */ #ifdef __orxWINDOWS__ #ifndef orxFASTCALL #define orxFASTCALL __cdecl //change this to __cdecl from __fastcall #endif /* !orxFASTCALL */ #define orxSTDCALL __stdcall #define orxCDECL __cdecl /** The function will be exported (dll compilation) */ #define orxDLLEXPORT __declspec(dllexport) /** The function will be imported (exe compilation) */ #define orxDLLIMPORT __declspec(dllimport) /** The null address */ #define orxNULL (0) /** Inline */ #ifndef orxINLINE /* *** Compiler specific *** */ #if defined(__orxGCC__) || defined(__orxLLVM__) /** The function intend to be inlined. */ #define orxINLINE inline #elif defined(__orxMSVC__) /** The function intend to be inlined. */ #define orxINLINE __inline #endif #endif /* !orxINLINE */ #else /* __orxWINDOWS__ */
This is a big project and will take sometime to get a Eu wrapper going. Stay tuned. There are many functions and flags for this.