Hi,
I am expericing hard times with build error.
First of all, cross-compile server setup(LINUX machine) is completed.
After that, I've installed all requirements to build this project. (CMAKE v3.18.2, mingw32, etc...)
I downloaded full source codes from SVN (https://svn.code.sf.net/p/xc3sprog/code/trunk)
As you can see yellow highlighted log below, CMAKE found libftdi, but build error(can not find ftdi library) occured with red hilighted log below.
I referred "Application Note (AN_220) FTDI Drivers Installation Guide for LINUX ver2.1" to solve the problem , but I have no idea why this build error happens.
Please have a look for the log below.. (expecially #2)CMAKE, #3)BUILD highlited logs) and help me to figure this out.
Many thanks,
Don
Let me explain the steps what I've done.
1)FTDI driver install (for cross compile)
$ wget https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.4.22.tgz
$ tar -xvf libftd2xx-x86_64-1.4.22.tgz
$ sudo cp release/build/lib* /usr/local/lib/ # /usr/local/lib is lib path in my case
$ cd /usr/local/lib
$ sudo ln -s -f libftd2xx.so.1.4.24 libftd2xx.so # -f option added, because this is not first try
$ sudo chmod 755 libftd2xx.so.1.4.24
$sudo cp libftd2xx.so.0.4.16 /usr/lib/libftd2xx.so.0.4.16
$sudo cp ftd2xx.h /usr/include/ftd2xx.h
$sudo cp WinTypes.h /usr/include/WinTypes.h
I did same way for headers (ftd2xx.h, WinTypes.h)
2)CMAKE
$ cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain-mingw32.cmake ..
please have a look for the log below..
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: i686-w64-mingw32-pkg-config (found version "0.26")
-- Checking for module 'libftdi'
-- Found libftdi, version 0.20
CMake Warning at CMakeLists.txt:27 (find_package):
By not providing "Findlibftd2XX.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"libftd2XX", but CMake did not find one.
Could not find a package configuration file provided by "libftd2XX" with
any of the following names:
libftd2XXConfig.cmake libftd2xx-config.cmake
Add the installation prefix of "libftd2XX" to CMAKE_PREFIX_PATH or set
"libftd2XX_DIR" to a directory containing one of the above files. If
"libftd2XX" provides a separate development package or SDK, be sure it has
been installed.
-- Found Subversion: /usr/local/bin/svn (found version "1.8.10")
-- Configuring done
WARNING: Target "xc3sprog" requests linking to directory "/usr/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "readdna" requests linking to directory "/usr/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "detectchain" requests linking to directory "/usr/lib". Targets may link only to libraries. CMake is dropping the item.
-- Generating done
-- Build files have been written to: /home/don.yang/work/FPGA_work/try1/build-win32
3)BUILD
Scanning dependencies of target xc3sprog
[ 16%] Building CXX object CMakeFiles/xc3sprog.dir/xc3sprog.cpp.obj
[ 16%] Building CXX object CMakeFiles/xc3sprog.dir/javr.cpp.obj
[ 16%] Building CXX object CMakeFiles/xc3sprog.dir/srecfile.cpp.obj
[ 16%] Building CXX object CMakeFiles/xc3sprog.dir/progalgavr.cpp.obj
[ 16%] Linking CXX executable xc3sprog.exe
/usr/bin/i686-w64-mingw32-ld: cannot find -lftdi
collect2: error: ld returned 1 exit status
make[2]: [xc3sprog.exe] Error 1
make[1]: [CMakeFiles/xc3sprog.dir/all] Error 2