From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14684 invoked by alias); 16 May 2012 06:43:22 -0000 Received: (qmail 14676 invoked by uid 22791); 16 May 2012 06:43:21 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=BAYES_00,RCVD_VIA_APNIC,TW_BF X-Spam-Check-By: sourceware.org Received: from out76.rilinfo.net (HELO out76.rilinfo.net) (202.138.96.76) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 May 2012 06:42:56 +0000 Received: from unknown (HELO mail.cmie.com) ([220.226.204.53]) by out.rilinfo.net with ESMTP; 16 May 2012 06:40:46 +0000 Received: from sutlej.cmie.ernet.in (ho.cmie.com [192.168.1.4]) by mail.cmie.com (Postfix) with ESMTP id DECBB70001; Wed, 16 May 2012 12:12:49 +0530 (IST) Received: from indus.cmie.ernet.in (indus.cmie.ernet.in [196.1.1.3]) by sutlej.cmie.ernet.in (Postfix) with ESMTP id ECEA317D618; Wed, 16 May 2012 12:12:49 +0530 (IST) Date: Wed, 16 May 2012 06:43:00 -0000 From: Dhananjay Bal Sathe To: libffi-discuss@sourceware.org, green@moxielogic.com Subject: LibFFI and Visual Studio 2010 C++. Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org X-SW-Source: 2012/txt/msg00197.txt.bz2 Dear Gentlemen, I am considering use of libffi with Visual C++. I have the following trouble in moving upto there. There seems to be hidden assumption that a Windows user also has cygwin installed and he is compiling under it's "sh". And there does not appear to be a direct target like "win32-vc", or "win64-vc". Visual C++ has quite a few calling protocols, for example WINAPI(=> PASCAL => calle restores the stack), FASTCALL(register usage), THISCALL (this in register) etc. I am not finding equivalant of these in "ffitarget.h" (somewhere near FFI_STDCALL or so). Assuming LibFFI is working for MSVC (of Visual Studio 2010) the installation process will involve: A ./configure ... under some assumptions. B Approprite files from libFFI/src/ will be copied into a seperate directoty. C Compile the file using "cl" (and "ml64"?). D Link using "link" do make final DLL. OR Make archive using "lib". (I think Link is done). These steps simply do not work. With little browsing thru the "configure", and "msvcc.sh" script I realized that it can not really work!. There is no apperant provision for setting up shell variables (variables involved are CL, LINK, INCLUDE, and LIBPATH depending on subject to various conditions). Can someone provide one of: A Complete list of files needed for VC++/Win32 with compilation commands. Seperate list of files for VC++/Win64 with compilation commands. (There will be two list's of file names) B Actualy configure for VC++/Win32 at location where it is found working and tar/zip the install set. Same for VC++/64. (There will be two tar/zip-s) >From one/both of the above (I think) I will be able to compile. Based on my compilation experience I will wirte notes for such installation. And I intend to coduct little extensive tests before usage. I would like to return these two to LibFFI group, for the benifit of others. Thanks in advance. dbs :) --