libftdi Archives

Subject: Re: Compiling libftdi-1.0 within MinGW under Windows

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 5 Jul 2010 22:14:35 +0800
On Sun, Jul 4, 2010 at 8:00 PM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
> Cross-building under Linux is much easier.
>
> I just uploaded the binary package for the latest git here.
> It does not have the Python and Boost bindings. It has
> the include file, the dll, the library, the html docs and the examples.
>
> http://code.google.com/p/picusb/downloads/list
> http://picusb.googlecode.com/files/libftdi1_04July2010.zip
>

The above version is not properly done (no async), the updated
version (with async) is here.
http://picusb.googlecode.com/files/libftdi1_05July2010.zip

I have also tried the mingw-w64 64 bit build (with async).
http://picusb.googlecode.com/files/libftdi1_05July2010_mingw-w64.zip

The underline MinGW-w64 build of libusb-1.0 Windows backend
is also uploaded.
http://picusb.googlecode.com/files/libusb1_pbr283_mingw64.zip

All the above are untested. But I will test them later under
Windows 7 x64.

To build 64bit MinGW-w64, I use the Cross Compiler here.
Cross Compiler:
http://www.drangon.org/mingw/
http://www.drangon.org/mingw/mirror.php?num=2&fname=mingw-w64-x86_64-cross-i686-bin-20100605.tar.bz2
cross mingw-w64 toolchain under linux i686, build (gcc 4.5 branch)
from SVN 2010-06-05

DDK Headers from MinGW-w64 test branch, Rev 2769
svn co 
https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/experimental/ddk_test
mingw-w64-ddk_test

I also created two CMake files. I do not know much about CMake so that
I am not so sure if it is correct or not.

1) Toolchain-Crossbuild64.cmake
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)

# which compilers to use for C and C++
SET(CMAKE_C_COMPILER /home/mcuee/mingw-w64/bin/x86_64-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER /home/mcuee/mingw-w64/bin/x86_64-w64-mingw32-g++)

# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH  /home/mcuee/mingw-w64/x86_64-w64-mingw32)

# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

2) Toolchain-Crossbuild64.cmake
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER gcc -m64)
set(CMAKE_CXX_COMPILER g++ -m64)
set(CMAKE_FIND_ROOT_PATH /usr/lib)


Xiaofan http://sourceforge.net/projects/libusb-win32/

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread