On Tue, Sep 6, 2011 at 9:58 PM, Xiaofan Chen <[email protected]> wrote: > On Tue, Sep 6, 2011 at 9:10 PM, Xiaofan Chen <[email protected]> wrote: >> For the libftdi.git, the patches are all CMake related. In order >> to build libftdi.git with Cygwin, MinGW, MinGW/MSys and >> MSVC, I need the following patches. >> >> The patches are apparently not correct, especially the 2nd >> and the 3rd as the patches will break Linux. >> > > > One more issue with libftdi-1.0 git CMake, the detect of > libconfuse is apparently flawed. If you use Linux to cross-compile > for Windows with MinGW, it will wrongly detect the native > libconfuse. But then you can put the correct MinGW files > into the corresponding include and lib dir so that you > can build the final ftdi_eeprom.exe. > > Under Windows MinGW, it always say that libconfuse > does not exist. Maybe it is good to let the user specify > the locations of libconfuse, just like libusb-1.0. >
Another thing with probably CMake as well, or maybe it is a MinGW-Boost problem. I can build the test program with MSVC2010 after tweaking the CMake generated MSVC Solution/Project files. Linking CXX executable test_libftdi.exe cd /d D:\work\libftdi\libftdi-1.0\build_mingw_boost\test && "D:\Program Files\CMake 2.8\bin\cmake.exe" -E cmake_link_script CMakeFil es\test_libftdi.dir\link.txt --verbose=1 "D:\Program Files\CMake 2.8\bin\cmake.exe" -E remove -f CMakeFiles\test_libftdi.dir/objects.a c:\MinGW_boost\bin\ar.exe cr CMakeFiles\test_libftdi.dir/objects.a @CMakeFiles\test_libftdi.dir\objects1.rsp c:\MinGW_boost\bin\g++.exe -O3 -DNDEBUG -Wl,--whole-archive CMakeFiles\test_libftdi.dir/objects.a -Wl,--no-whole-archive -o test_libftdi.exe -Wl,--out-implib,libtest_libftdi.dll.a -Wl,--major-image-version,0,--minor-image-version,0 ..\src\libftdi.dll.a C:\Mi nGW_boost\lib\libboost_unit_test_framework.a D:\work\libusb1\snapshots\libusb_2011.07.20\MinGW32\static\libusb-1.0.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 CMakeFiles\test_libftdi.dir/objects.a(basic.cpp.obj):basic.cpp:(.text+0x21): undefined reference to `_imp___ZTVN5boost9unit_test13te st_observerE' CMakeFiles\test_libftdi.dir/objects.a(basic.cpp.obj):basic.cpp:(.text+0xce): undefined reference to `_imp___ZN5boost9unit_test15unit _test_log_t14set_checkpointENS0_13basic_cstringIKcEEjS4_' CMakeFiles\test_libftdi.dir/objects.a(basic.cpp.obj):basic.cpp:(.text+0x220): undefined reference to `_imp___ZN5boost10test_tools9tt _detail10check_implERKNS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS1_10tool_levelENS1_10check_typeEjz' ... CMakeFiles\test_libftdi.dir/objects.a(baudrate.cpp.obj):baudrate.cpp:(.text.startup+0x353): undefined reference to `_imp___ZTVN5boos t9unit_test15unit_test_log_tE' collect2: ld returned 1 exit status make[2]: [test/test_libftdi.exe] Error 1 (ignored) -- Xiaofan -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
