# How to Lib/DLL for FreeBSD on Windows



## Musharraf (Jan 25, 2011)

Hi all,

I am developer on Windows Platform, and I want to port my Windows DLL into FreeBSD LiB/DLL. I don*'*t know whether LIB or DLL supportable on FreeBSD Platform.


Please let me know how is it possible to make Lib/DLL for FreeBSD on Windows Platform.


Thanks
Musharraf Hussain


----------



## mk (Jan 25, 2011)

FreeBSD porter's handbook


----------



## SirDice (Jan 25, 2011)

DLLs are primarily a windows thing. It's done slightly different on *nix but the principles are the same.

See rtld(1) for instance.


----------



## Musharraf (Jan 25, 2011)

*How to make LIB for FreeBSD in Windows Platform*

Hi SirDice,

Let me know how is it possible to make LIB  for FreeBSD on Windows platform.

Note, I am using Windows

Thanks


----------



## SirDice (Jan 25, 2011)

Musharraf said:
			
		

> Let me know how is it possible to make LIB  for FreeBSD on Windows platform.


I'm sure it's possible but I have no idea how to do this on Windows.


----------



## Zare (Apr 2, 2012)

It could be possible with cross-compilation, but quick google reveals no results with Windows host (gcc/mingw) and FreeBSD target. The easiest way would be to install a FreeBSD virtual machine under VirtualBox and do a native build. Of course, first step would be to port your code to FreeBSD. Interfaces are completely different - you'll have less work if you have clean separation between interfaces and logic in your code.


----------

