libftdi Archives

Subject: Re: Building the unit test program with MinGW GCC

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sun, 17 Feb 2013 20:37:47 +0800
On Sat, Feb 16, 2013 at 3:28 PM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
> On Sat, Feb 16, 2013 at 2:57 PM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
>> I am able to build almost everything of libftdi1-1.0 under
>> native Windows with a 3rd-party MinGW toolchain with
>> Boost built-in.
>> Toolchain: http://nuwen.net/mingw.html
>>
>> I am using the 9.5 version with Boost 1.52, gcc 4.7.2,
>> CMake 2.8.2 and libconfuse 2.7.
>>
>> It seems to me one of the linker option is missing.
>> But I am not a boost expert to sort out the issue.
>> Any help? Thanks in advance.
>
> Maybe this is a toolchain issue.
>
> As a comparison, the following is from Ubuntu Linux 12.04 x86,
> with gcc 4.7.2 and boost 1.49.

Now I believe it is a toolchain issue. In the end I build
Boost 1.49 under MinGW.org following this link.
http://code-slim-jim.blogspot.sg/2012/04/boost-149-in-windows-7-using-mingw.html

After that I have no problems to build the libftdi1-1.0
Boost Binding and the unit test program.

mcuee@Acer_netbook /c/work/libftdi/libftdi1-1.0/build
$ make
[  4%] Built target docs
[ 12%] Built target ftdi1
[ 20%] Built target ftdi1-static
Scanning dependencies of target ftdipp1
[ 24%] Building CXX object ftdipp/CMakeFiles/ftdipp1.dir/ftdi.cpp.obj
Linking CXX shared library libftdipp1.dll
[ 24%] Built target ftdipp1
Scanning dependencies of target ftdipp1-static
[ 28%] Building CXX object ftdipp/CMakeFiles/ftdipp1-static.dir/ftdi.cpp.obj
Linking CXX static library libftdipp1.a
[ 28%] Built target ftdipp1-static
[ 36%] Built target doc_i
[ 44%] Built target _ftdi1
[ 48%] Built target ftdi_eeprom
Scanning dependencies of target baud_test
[ 52%] Building C object examples/CMakeFiles/baud_test.dir/baud_test.c.obj
Linking C executable baud_test.exe
[ 52%] Built target baud_test
Scanning dependencies of target bitbang
[ 56%] Building C object examples/CMakeFiles/bitbang.dir/bitbang.c.obj
c:/work/libftdi/libftdi1-1.0/examples/bitbang.c: In function 'main':
c:/work/libftdi/libftdi1-1.0/examples/bitbang.c:67:9: warning: unknown conversio
n type character 'h' in format [-Wformat]
c:/work/libftdi/libftdi1-1.0/examples/bitbang.c:67:9: warning: too many argument
s for format [-Wformat-extra-args]
Linking C executable bitbang.exe
[ 56%] Built target bitbang
Scanning dependencies of target bitbang2
[ 60%] Building C object examples/CMakeFiles/bitbang2.dir/bitbang2.c.obj
Linking C executable bitbang2.exe
[ 60%] Built target bitbang2
Scanning dependencies of target bitbang_cbus
[ 64%] Building C object examples/CMakeFiles/bitbang_cbus.dir/bitbang_cbus.c.obj

Linking C executable bitbang_cbus.exe
[ 64%] Built target bitbang_cbus
Scanning dependencies of target bitbang_ft2232
[ 68%] Building C object examples/CMakeFiles/bitbang_ft2232.dir/bitbang_ft2232.c
.obj
Linking C executable bitbang_ft2232.exe
[ 68%] Built target bitbang_ft2232
Scanning dependencies of target eeprom
[ 72%] Building C object examples/CMakeFiles/eeprom.dir/eeprom.c.obj
Linking C executable eeprom.exe
[ 72%] Built target eeprom
Scanning dependencies of target find_all
[ 76%] Building C object examples/CMakeFiles/find_all.dir/find_all.c.obj
Linking C executable find_all.exe
[ 76%] Built target find_all
Scanning dependencies of target find_all_pp
[ 80%] Building CXX object examples/CMakeFiles/find_all_pp.dir/find_all_pp.cpp.o
bj
Linking CXX executable find_all_pp.exe
[ 80%] Built target find_all_pp
Scanning dependencies of target serial_test
[ 84%] Building C object examples/CMakeFiles/serial_test.dir/serial_test.c.obj
Linking C executable serial_test.exe
[ 84%] Built target serial_test
Scanning dependencies of target simple
[ 88%] Building C object examples/CMakeFiles/simple.dir/simple.c.obj
Linking C executable simple.exe
[ 88%] Built target simple
Scanning dependencies of target stream_test
[ 92%] Building C object examples/CMakeFiles/stream_test.dir/stream_test.c.obj
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c: In function 'readCallback':

c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:87:28: warning: unknown conv
ersion type character 'l' in format [-Wformat]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:87:28: warning: too many arg
uments for format [-Wformat-extra-args]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:102:28: warning: unknown con
version type character 'l' in format [-Wformat]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:102:28: warning: too many ar
guments for format [-Wformat-extra-args]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c: In function 'main':
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:252:16: warning: unknown con
version type character 'l' in format [-Wformat]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:252:16: warning: unknown con
version type character 'L' in format [-Wformat]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:252:16: warning: format '%d'
 expects argument of type 'int', but argument 4 has type 'uint64_t' [-Wformat]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:252:16: warning: unknown con
version type character 'L' in format [-Wformat]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:252:16: warning: too many ar
guments for format [-Wformat-extra-args]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c: In function 'check_outfile'
:
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:340:29: warning: unknown con
version type character 'l' in format [-Wformat]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:340:29: warning: too many ar
guments for format [-Wformat-extra-args]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:354:21: warning: unknown con
version type character 'l' in format [-Wformat]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:354:21: warning: too many ar
guments for format [-Wformat-extra-args]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:356:13: warning: unknown con
version type character 'l' in format [-Wformat]
c:/work/libftdi/libftdi1-1.0/examples/stream_test.c:356:13: warning: too many ar
guments for format [-Wformat-extra-args]
Linking C executable stream_test.exe
[ 92%] Built target stream_test
Scanning dependencies of target test_libftdi1
[ 96%] Building CXX object test/CMakeFiles/test_libftdi1.dir/basic.cpp.obj
[100%] Building CXX object test/CMakeFiles/test_libftdi1.dir/baudrate.cpp.obj
Linking CXX executable test_libftdi1.exe
[100%] Built target test_libftdi1


-- 
Xiaofan

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

Current Thread