pure_evil wrote:
Here's source for a .cpl that compiles fine with dev-c++. How can I make it work with winegcc?
I had to do this to make winegcc happy:
--- skeleton/skeleton.c 2008-03-31 09:00:55.000000000 -0700 +++ skeleton.ok/skeleton.c 2008-03-31 11:34:24.128617000 -0700 @@ -24,12 +24,12 @@
#include "skeleton.h"
-LONG APIENTRY Applet1(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam); +LONG APIENTRY Applet1(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam); HINSTANCE hApplet = 0;
APPLET Applets[1] = { {CPLICON, CPLNAME, CPLDESC, Applet1} };
-LONG APIENTRY Applet1(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam) +LONG APIENTRY Applet1(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam) { return 1; }
LONG CALLBACK
but then I was able to generate a DLL that worked with control like this:
winegcc -mwindows skeleton.c -c -I ../wine-git/include winegcc -shared skeleton.dll.spec skeleton.o -o skeleton.dll.so -lkernel32 -lntdll -lshell32 -L ../wine-git/libs/wine wine control skeleton.dll.so
Worked first try. (Good thing, too, since I was just copying what wine already does to build its dlls, and I wouldn't have known what to do if it failed.)
Does that work for you? - Dan