Search the Community
Showing results for tags 'mingw'.
Found 1 result
-
Hi everyone, After reading the BIS documentation of how to create extensions (https://community.bistudio.com/wiki/Extensions) and see examples from KK's blog I tried to make the same sample but on Cygwin (MSYS-2) but It's doesn't work. I do appreciate some help from anyone with more experience than me. I share the code and the compilation command lines: Source code (my1st.cpp): // Windows Header Files: #include <Windows.h> #define DLLEXPORT __declspec(dllexport) extern "C" { DLLEXPORT void __stdcall RVExtension(char *output, int outputSize, const char *function); } void __stdcall RVExtension(char *output, int outputSize, const char *function) { strncpy_s(output, outputSize, "IT WORKS!", _TRUNCATE); } BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: break; case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } Command line compilation: g++ -c -o my1st.o my1st.cpp g++ -o my1st.dll my1st.o -s -shared -Wl,--subsystem,windows
- 21 replies
-
- dll
- extensions
-
(and 1 more)
Tagged with: