Have you checked this?
For a quick solution, scroll down to the bottom. In brief, it is
gcc -shared -o DLL_file OBJ_files -Wl,--output-def,DEF_file
gcc -shared -o DLL_file OBJ_files -Wl,--kill-at
dlltool -d DEF_file --dllname DLL_file --output-lib LIB_file --kill-at
--- Original Message from Gisle Vanem ---
I've built a DLL using gcc 3.4 and ld 2.15.90 20040222 that
I'd also like to use in a MSVC6 program without having to
relink it with MSVC.
My problem is that any stdcall functions are missing the
'_' prefix as MSVC seems to require. I've tried several ld options;
--disable-stdcall-fixup, --enable-stdcall-fixup and --add-stdcall-alias,
but seems to be getting nowhere.
I prototype my stdcall functions like:
extern __declspec(dllexport) int __stdcall foo (void);
and create the DLL and import-lib with:
../lib/libwatt32.dll.a ../bin/watt-32.dll: $(OBJS)
-o ../bin/watt-32.dll $^
I don't use a .def file and hope to avoid it. Is there an easy solution
Get latest updates about Open Source Projects, Conferences and News.