Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to build open source libraries DLLs for Windows developers to use?

I have several C free software/open source libraries that I develop on Linux and OSX with the GNU toolchain (automake, conf, flex, bison, gcc, ...) but I occasionally get requests to provide Windows DLLs. I'd like to be able to provide those without having to spend a lot of time and money with Windows Visual Studio development. I do have a Windows XP virtual machine available and I also know the software is portable as occasionally I get patches to make it build in on windows.

What approaches or tools should I be using? Cross compiling on Linux? using Visual Studio Express or something else? I would prefer something that is fully automated from a SVN repository. I do not count cygwin as a solution since that does not seem to provide what Windows developers need, as far I understand the issues - linking and DLLs.

like image 396
dajobe Avatar asked Jun 12 '09 17:06

dajobe


People also ask

How do I create a DLL in Visual Studio?

Create a DLL Project In Visual Studio, select File»New Project to open the New Project dialog box. From the Visual C++ Templates list, select Win32 Project, name your project, and click OK.

What is DLL in Visual Studio?

A DLL (dynamic-link library) is a library that contains code and data that can be used by more than one app. You can use Visual Studio to create, build, configure, and debug DLLs.

How many types of DLLs are there?

There are two types of DLLs: simple and complex. A simple DLL contains only DLL code in which special code sequences are generated by the compiler for referencing functions and external variables, and using function pointers.


1 Answers

You can try Mingw with MSYS, Visual Studio (Express) with SUA (subsystem for unix application) or Cygwin to compile programs that are automake/autoconf based (./configure && make to build under linux).

Unfortunately usually the lib file they create is not compatible with other compilers, so if you want your library to work with an application that is developed using Visual Studio, then you should use the VSC++ approach. Usually a lot of GNU projects (check gnuwin32) actually have VC compatible build scripts too, than can be compiled using "nmake"

like image 133
SztupY Avatar answered Nov 12 '22 13:11

SztupY