This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: building with msvc
- From: Timothy Wall <twall at users dot sf dot net>
- To: Aaron Patterson <aaron at tenderlovemaking dot com>
- Cc: libffi-discuss <libffi-discuss at sourceware dot org>
- Date: Tue, 31 May 2011 13:46:14 -0400
- Subject: Re: building with msvc
- References: <20110531170450.GA55399@higgins.local>
You should be able to just run configure under cygwin with CC=path/to/msvcc.sh, although my first attempt configuring that way failed on win64 so I went back to my original script.
I wrote the adapter script originally for the JNA project. I just recently had to make some tweaks to my original script to convert paths (using cygpath), since apparently the windows path-fixing has been removed from configure. If you're using cygwin you usually have to patch up the unix-style paths into something msvc understands.
My updated script is here: http://java.net/projects/jna/sources/svn/show/trunk/jnalib/native/cc.sh (also ld.sh). I just added path-fixing, I didn't back-port any of the other tweaks that may have gone into msvcc.sh. I just successfully configured and built using CC=cc.sh and LD=ld.sh, but that's on win64. You may have to make some modifications for 32-bit windows, I've not tried an msvc build on win32 for a long time.
On May 31, 2011, at 1:04 PM, Aaron Patterson wrote:
> Hi everyone!
>
> Are there instructions for building libffi on windows using msvc? I see
> it mentioned once in the readme, but I'm not sure what I need on my
> system in order to run configure and the msvcc.sh shell script.
>
> I'd like to build the .dll and the .lib file. Any hints would be
> greatly appreciated!
>
> --
> Aaron Patterson
> http://tenderlovemaking.com/