- Windows cross compile raspberry
- Re: Setup QT windows to cross compile for Raspberry Pi 2
- Re: Setup QT windows to cross compile for Raspberry Pi 2
- Windows cross compile raspberry
- Windows cross compile raspberry
- Re: Cross Compiling Windows
- Re: Cross Compiling Windows
- Re: Cross Compiling Windows
- Re: Cross Compiling Windows
- Re: Cross Compiling Windows
- Re: Cross Compiling Windows
- Re: Cross Compiling Windows
- Re: Cross Compiling Windows
- Re: Cross Compiling Windows
Windows cross compile raspberry
So I will start off by saying that I do NOT want know how to setup or run QT on the pi. I am specifically trying to setup Qt Creator 4.0.3 (Based on Qt 5.7.0 (MSVC 2013, 32 bit)) to write and compile C++ and the run it on the Raspberry pi 2. I have found that running qt on the pi is far to slow.
I have searched for two days to find the right toolchain download for qt/raspberry and its corresponding qt configuration. Nothing seems to work. I have found what seems like a thousand dead ends searching the web. I can write and compile apps for windows console fine. But finding information to cross compile for raspberry seems to be an elusive Unicorn!
Does anyone have this working. If so which of the many toolchains did you use? And please help me replicate your QT configuration. The closest I have come is using the GCC ARM Embedded toolchain but I cant seem to get the QT options set correctly and I believe that only gets me part of the way there. My ultimate goal is to control GPIO and use the RadioHead library.
Thanks in advance!
Re: Setup QT windows to cross compile for Raspberry Pi 2
>> The closest I have come is using the GCC ARM Embedded toolchain but I cant seem to get the QT options set correctly
You mean the QtCreator Options ?
I cant say that I have done this, ( and if I would attempt it I would have used Ubuntu and not windows ) but here are some observations from reading a few threads on the subject.
There are three steps needed to make a Cross compiler environment.
1: Install a toolchain.
2: Copying/creating all the header files and libraries. needed to build your program ( unless you program uses NO other libraries than the standard C or C++ runtime )
3: Setting up the IDE for crosscompiling target.
—
1: http://gnutoolchains.com/raspberry/ — They also has a tutorial that can verify that toolchain is installed correctly.
2: This is where you have to actually copy all the files in «/usr/include» and «/usr/lib» from a working Raspbian SD card. And if you want to use a specific library that is not installed by default, you have to boot the SD-card on a real Pi and install the library (and its «-dev» package ) before you transfer the files to your windows PC. Where you put these files will probably be used as «sysroot» parameter in the next step.
3: Setting up QtCreator with the correct paths for toolchain, include files and libraries. Probably easy if one understands how the different things in QtCreator hang together, the rest of us need guides: http://stackoverflow.com/questions/3202 . r-the-rasp
Re: Setup QT windows to cross compile for Raspberry Pi 2
You mean the QtCreator Options ?
I cant say that I have done this, ( and if I would attempt it I would have used Ubuntu and not windows ) but here are some observations from reading a few threads on the subject.
First off, Thanks for the reply! My responses are inline below…………..
There are three steps needed to make a Cross compiler environment.
1: Install a toolchain.
Done- and it shows up in QT.
2: Copying/creating all the header files and libraries. needed to build your program ( unless you program uses NO other libraries than the standard C or C++ runtime )
I would like to start by getting a simply hello world cross compile to work. I believe that means that the too chain includes all I need?
3: Setting up the IDE for crosscompiling target.
This is where I believe I need help!
—
1: http://gnutoolchains.com/raspberry/ — They also has a tutorial that can verify that toolchain is installed correctly.
This does not appear to help setting up QT but looks like great info for not using QT. But I would really like to get QT working.
2: This is where you have to actually copy all the files in «/usr/include» and «/usr/lib» from a working Raspbian SD card. And if you want to use a specific library that is not installed by default, you have to boot the SD-card on a real Pi and install the library (and its «-dev» package ) before you transfer the files to your windows PC. Where you put these files will probably be used as «sysroot» parameter in the next step.
I am not sure why this is needed? If this is to get libs for *more* than a simple hello app. Then I will put it off for now and get back to it when I get the basics working.
3: Setting up QtCreator with the correct paths for toolchain, include files and libraries. Probably easy if one understands how the different things in QtCreator hang together, the rest of us need guides: http://stackoverflow.com/questions/3202 . r-the-rasp
I looked through this info but it is for a linux version of qt as a host. The setting do not match the windows version I have (latest). Very confusing.
Perhaps you will see something in these config screens that will help?
Windows cross compile raspberry
Finally built a Cross Compiler for Windows -> Raspberry Pi
Here is the development environment I would recommend for Windows:
1. Eclipse IDE running on Windows with C++ plugin.
2. Share Raspberry Pi or QEmu network file system to windows using TAP bridge.
3. Build your source code in Eclipse IDE on network share.
4 Test built code on Raspberry Pi itself or QEmu if you do not have one yet.
Here are my working notes to build a Windows Cross Compiler for the Raspberry Pi
———>8—————————>8———————————->8———————————
1.1 Install Tools
1. Install Cygwin with bison, flex, gettext, libtool, automake, libncurses5-dev, make, gcc-tools-epoch2-automake,
wget, gperf, patch, gcc-g++, git-svn.
2. Download and copy crosstool-ng-1.15.2 into the cygwin subdirectory.
3. $ tar jxf crosstool-ng-1.15.2.tar.bz2 – From the Cygwin prompt, extracts .tar.bz2 file from
http://crosstool-ng.org/hg/crosstool.ng
4. Run regedit and update the following setting to make cygwin case sensitive and then reboot:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive=0
5. $ cd crosstool-ng-1.15.2
6. $ export PATH=/opt/gcc-tools/bin:$PATH
7. $ ./configure —prefix=/opt/cross
1.2 Update crosstool-ng & eglibc to work with Cygwin
• When running make for crosstool-ng on cygwin, some errors regarding ncurses include and gettext
linking are produced: The code changes in the ‘crosstool-ng—cygwin.patch’ were made manually to
get crosstools-ng working with Cygwin.
• When running ct-ng build some egclibc rpc errors were produced. The code changes in ‘egibc 2.12 cygwin patch’
were made manually to eglibc 2.12 working with a Cygwin host.
1.3 Making crosstool-ng
8. $ make
9. $ make install
10. $ export PATH=$PATH:/opt/cross/bin
1.4 Create Toolchain
11. Create a directory /myCross. Crosstool-ng will use this as a staging area and will contain your toolchain
configuration, downloaded files and build results. This directory is likely to use at least (2GB+) of space.
12. $ cd /myCross.
13. $ ct-ng menuconfig. The the ct-ng configuration menu should appear, make the following changes:
Menu
—-
Paths and misc options | Try features marked as EXPERIMENTAL – Enable
| Change your Prefix directory to: /opt/cross/x-tools/$
Target options | Change the Target architecture to arm.
| Leave Endianness set to Little endian and Bitness set to 32-bit.
| Change Floating point to softfp (For Raspberry Pi/Debian Squeeze — Open GL ES Examples)
Operating System | Change Target OS to Linux
Binary Utilities | Change binutils version to 2.21.1a (latest non experimental).
C compiler | Show Linaro versions (EXPERIMENTAL) – Enable
| Set gcc version to linaro-4.6-2012.04 (EXPERIMENTAL) – ARM optimized compiler.
| Notes.
| Build failed to download the Linario version so I went back and set this option
| to vanilla gcc 4.6.3
| Make sure C library is set to eglibc and not uClibc or glibc.
| (eglibc is Embedded glibc which Debian switched to from glibc)
| C compiler Crosstool-ng doesn’t build a C++ compiler by default.
| Additional Supported languages -> C++ — Enable
| You should use arm-unknown-linux-gnueabi-g++ instead of the -gcc version for C++ source files.
Leave all other settings at their default values.
Exit the configuration tool and save your changes.
You may additionally want to set more specific architecture settings in your .config file as shown in the table below
CT_ARCH_CPU=»arm1176jzf-s»
CT_ARCH_TUNE=»arm1176jzf-s»
CT_ARCH_FLOAT_HW=y or CT_ARCH_FLOAT_SOFTFP=y
CT_ARCH_FLOAT=»hard» or CT_ARCH_FLOAT=»softfp»
14. $ cd /myCross – Make sure this is /myCross and not /cygdrive as /cygdrive is case insensitive by default.
15. $ ct-ng build — This will take some time.
Notes.
• Raspbery Pi displays the following version information: cat /proc/version: Linux version 3.1.9+ and
(Sourcery G++ Lite) gcc version 4.5.2
——————- crosstool-ng—cygwin.patch —————————-
— crosstool-ng-1.15.0_old/kconfig/Makefile 2012-04-30 16:54:20.000000000 -0400
+++ crosstool-ng-1.15.0/kconfig/Makefile 2012-05-08 11:10:24.950066100 -0400
@@ -35,20 +35,21 @@
conf_OBJ = $(patsubst %.c,%.o,$(conf_SRC))
conf_DEP = $(patsubst %.o,%.dep,$(conf_OBJ))
$(conf_OBJ) $(conf_DEP): CFLAGS += $(INTL_CFLAGS)
+conf: LDFLAGS += -lintl
# What’s needed to build ‘mconf’
mconf_SRC = mconf.c
mconf_OBJ = $(patsubst %.c,%.o,$(mconf_SRC))
mconf_DEP = $(patsubst %.c,%.dep,$(mconf_SRC))
$(mconf_OBJ) $(mconf_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS)
-mconf: LDFLAGS += $(NCURSES_LDFLAGS)
+mconf: LDFLAGS += -lintl $(NCURSES_LDFLAGS)
# What’s needed to build ‘nconf’
nconf_SRC = nconf.c nconf.gui.c
nconf_OBJ = $(patsubst %.c,%.o,$(nconf_SRC))
nconf_DEP = $(patsubst %.c,%.dep,$(nconf_SRC))
-$(nconf_OBJ) $(nconf_DEP): CFLAGS += $(INTL_CFLAGS)
-nconf: LDFLAGS += -lmenu -lpanel -lncurses
+$(nconf_OBJ) $(nconf_DEP): CFLAGS += -I/usr/include/ncurses/ $(INTL_CFLAGS)
+nconf: LDFLAGS += -lintl -lmenu -lpanel -lncurses
# Under Cygwin, we need to auto-import some libs (which ones, exactly?)
# for mconf and nconf to lin properly.
— crosstool-ng-1.15.0_old/kconfig/nconf.c 2012-04-30 16:54:20.000000000 -0400
+++ crosstool-ng-1.15.0/kconfig/nconf.c 2012-05-07 16:47:39.618358900 -0400
@@ -1518,7 +1518,7 @@
>
notimeout(stdscr, FALSE);
— ESCDELAY = 1;
+ set_escdelay(1);
/* set btns menu */
curses_menu = new_menu(curses_menu_items);
—
——————— egibc 2.12 cygwin patch ————————-
— eglibc-2_9/timezone/Makefile.org 2011-02-08 10:46:29.000000000 +0100
+++ eglibc-2_9/timezone/Makefile 2011-02-08 10:45:34.000000000 +0100
@@ -176,6 +176,22 @@
$(zic-cmd) -p $(posixrules)
endif
+OS?= $(shell uname)
+ifeq ($(OS),Darwin)
+CROSSZICLDFLAGS=-L/opt/local/lib -lintl
+endif
+ifneq (,$(findstring Windows_NT,$(OS)))
+# cygwin!
+CROSSZICLDFLAGS=-L/usr/lib -lintl
+endif
+ifneq (,$(findstring CYGWIN_NT,$(OS)))
+# cygwin!
+CROSSZICLDFLAGS=-L/usr/lib -lintl
+endif
+ifeq ($(OS),FreeBSD)
+CROSSZICLDFLAGS=-L/usr/local/lib -lintl
+endif
+
zic-objs = zic.o ialloc.o scheck.o
$(objpfx)zic: $(addprefix $(objpfx), $(zic-objs))
@@ -185,7 +193,7 @@
-DCROSS_ZIC $(compile-mkdep-flags)
$(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs))
— gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@
+ gcc $(addprefix $(objpfx)cross-,$(zic-objs)) $(CROSSZICLDFLAGS) -o $@
tz-cflags = -DTZDIR='»$(zonedir)»‘ \
-DTZDEFAULT='»$(localtime-file)»‘ \
— eglibc-2_12/sunrpc/rpc/types.h.org 2011-02-07 20:48:29.000000000 +0100
+++ eglibc-2_12/sunrpc/rpc/types.h 2011-02-08 01:25:34.000000000 +0100
@@ -69,6 +69,7 @@
#endif
#ifndef __u_char_defined
+#if !defined(__APPLE__) && !defined(__BSD__) && !defined(_BSDTYPES_DEFINED)
typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
@@ -76,11 +77,14 @@
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
+#endif
# define __u_char_defined
#endif
#ifndef __daddr_t_defined
+#if !defined(__APPLE__) && !defined(__BSD__) && !defined(_BSDTYPES_DEFINED)
typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
+#endif
# define __daddr_t_defined
#endif
— eglibc-2_9/sunrpc/Makefile.org 2011-02-08 01:02:15.000000000 +0100
+++ eglibc-2_9/sunrpc/Makefile 2011-02-08 01:21:03.000000000 +0100
@@ -138,6 +138,22 @@
+OS?= $(shell uname)
+ifeq ($(OS),Darwin)
+CROSSRPCLDFLAGS=-L/opt/local/lib -lintl
+endif
+ifneq (,$(findstring Windows_NT,$(OS)))
+# cygwin!
+CROSSRPCLDFLAGS=-L/usr/lib -lintl
+endif
+ifneq (,$(findstring CYGWIN_NT,$(OS)))
+# cygwin!
+CROSSRPCLDFLAGS=-L/usr/lib -lintl
+endif
+ifeq ($(OS),FreeBSD)
+CROSSRPCLDFLAGS=-L/usr/local/lib -lintl
+endif
+
$(objpfx)rpcgen: $(addprefix $(objpfx),$(rpcgen-objs)) \
$(sort $(filter $(common-objpfx)libc%,$(link-libc))) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
@@ -148,7 +156,7 @@
$(OUTPUT_OPTION) $(compile-mkdep-flags)
$(objpfx)cross-rpcgen: $(addprefix $(objpfx)cross-,$(rpcgen-objs))
— gcc $^ -o $@
+ gcc $^ $(CROSSRPCLDFLAGS) -o $@
# This makes sure -DNOT_IN_libc is passed for all these modules.
cpp-srcs-left := $(rpcgen-objs:.o=.c)
—
Windows cross compile raspberry
I have a raspberry pi 2 model b+ running with raspbian whezzy and I am trying to use cross compiling.I am using eclipse in my windows 7 pc. I have followed this webpage:
My problem is that I can not compile a Hello World code. I get this error:
15:16:46 **** Build of configuration Debug for project CrossCompileYoutube ****
make all
‘Building file: ../src/cross.cpp’
‘Invoking: Cross G++ Compiler’
arm-linux-gnueabihf-g++ -I»C:\SysGCC\Raspberry\include» -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF»src/cross.d» -MT»src/cross.o» -o «src/cross.o» «../src/cross.cpp»
‘Finished building: ../src/cross.cpp’
‘ ‘
‘Building target: CrossCompileYoutube’
‘Invoking: Cross G++ Linker’
arm-linux-gnueabihf-g++ -L»C:\SysGCC\Raspberry\include\lib» -o «CrossCompileYoutube» ./src/cross.o
c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/lib/libstdc++.so: undefined reference to `clock_gettime@GLIBC_2.17′
collect2.exe: error: ld returned 1 exit status
make: *** [CrossCompileYoutube] Error 1
15:16:49 Build Finished (took 2s.971ms
I read that it is libraries problem but I do not know how I could solve it. Does someone know something about this problem?
Re: Cross Compiling Windows
I use sysGCC on Eclipse Luna on Windows 10.
I just followed the install instructions and use the managed compile (not manual make) with no problems
The main difference between this and the standard Eclipse C/C++ manager is:
In properties C/C++ build:
Under tool chain editor set «Cross GCC»
Under Cross settings set path:» /../sysGCC» (wherever your sysGCC is)
Under prefix set «arm-linux-gnueabihf-»
Under Cross GCC Compiler set «gcc»
Re: Cross Compiling Windows
mjubes wrote: I use sysGCC on Eclipse Luna on Windows 10.
I just followed the install instructions and use the managed compile (not manual make) with no problems
The main difference between this and the standard Eclipse C/C++ manager is:
In properties C/C++ build:
Under tool chain editor set «Cross GCC»
Under Cross settings set path:» /../sysGCC» (wherever your sysGCC is)
Under prefix set «arm-linux-gnueabihf-»
Under Cross GCC Compiler set «gcc»
Where are these three option in eclipse? Project > Properties > ??
Which Raspbian version are you using? Whezzy or Jessi. Because in the example it uses Jessie and maybe this could be the problem. However, I guess that it will be possible to achieve in wheezy as well.
Re: Cross Compiling Windows
>Where are these three option in eclipse? Project > Properties > ??
Project properties. This website explains the installation in more detail:
>Which Raspbian version are you using? Whezzy or Jessi.
Both. I had whezzy when I first installed it, now I have Jessi.
Re: Cross Compiling Windows
It looks like it works! I spent a lot of hours trying it yesterday and I did not achieve, and I have achieved it in just 10 minutes today!
It compiles perfect and I will try cross compiling the raspberry on monday. I will write here.
Re: Cross Compiling Windows
Glad it was helpful
One useful thing with Eclipse, you can add to it the standard «SSH remote» plug in, and use it to easily move files to and from the RPI using drag and drop,. Also useful for compiling programs on the RPI target itself (using Eclipse just as the main editor)
Useful for writing programs that require RPI only available libraries (e.g. alsa) or low level device drivers.
Re: Cross Compiling Windows
It has been very usefull your help mjubes!
I have tried cross compiling a simple HelloWorld and it works perfect! But now I have got an other problem.
I want to use external libraries (wiringPi), so I need to add it to eclipse. I have followed this steps but I did not achieve. I copied all the library from the raspberry to my Windows PC.
1. In the project properties -> C/C++ Build->Settings->Tools Settings->Cross GCC Compiler->Includes-> Include Paths: You must insert the path for the wiringpi.h file.
In my case: C:\RaspLib\wiringPi-f6c40cb\wiringPi
2. In the project properties -> C/C++ Build->Settings->Tools Settings->Cross G++ Compiler->Includes-> Include Paths: You must insert the path for the wiringpi.h file.
In my case: C:\RaspLib\wiringPi-f6c40cb\wiringPi
3. In the project properties -> C/C++ Build->Settings->Tools Settings->Cross G++ Linker->Libraries->Libraries: You must insert «WiringPi».
4. In the project properties -> C/C++ Build->Settings->Tools Settings->Cross G++ Linker->Libraries->Library search paths: You must insert the path where there is the file
wiringpi.so .
In my case: C:\RaspLib\wiringPi-f6c40cb\wiringPi
5. In the project properties -> C/C++ General ->Path and Symbols -> Includes -> GNU C -> Add -> Library search paths
In my case: C:\RaspLib\wiringPi-f6c40cb\wiringPi
6. In the project properties -> C/C++ General ->Path and Symbols -> Includes -> GNU C++ -> Add -> Library search paths
In my case: C:\RaspLib\wiringPi-f6c40cb\wiringPi
7. In the project properties -> C/C++ General ->Path and Symbols -> Library Path -> Add -> Library search paths
In my case: C:\RaspLib\wiringPi-f6c40cb\wiringPi
11:44:17 **** Build of configuration Debug for project CrossCompile ****
make all
‘Building file: ../src/CrossCompile.cpp’
‘Invoking: Cross G++ Compiler’
arm-linux-gnueabihf-g++ -std=c++0x -I»C:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\include\arm-linux-gnueabihf\c++\4.9″ -I»C:\RaspLib\wiringPi-f6c40cb\wiringPi» -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF»src/CrossCompile.d» -MT»src/CrossCompile.o» -o «src/CrossCompile.o» «../src/CrossCompile.cpp»
‘Finished building: ../src/CrossCompile.cpp’
‘ ‘
‘Building target: CrossCompile’
‘Invoking: Cross G++ Linker’
arm-linux-gnueabihf-g++ -L»C:\SysGCC\Raspberry\arm-linux-gnueabihf\lib» -L»C:\RaspLib\wiringPi-f6c40cb\wiringPi» -L»C:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\lib» -L»C:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\lib» -o «CrossCompile» ./src/CrossCompile.o -lwiringPi
c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld.exe: cannot find -lwiringPi
collect2.exe: error: ld returned 1 exit status
make: *** [CrossCompile] Error 1
11:44:21 Build Finished (took 3s.663ms)
Errors:
-cannot find -lwiringPi
-make:***[crosscompile] Error 1
Does someone know why it could be??
Re: Cross Compiling Windows
I have solved the problem. I just change the name of the file libwiringPi.so.xxx that was in C:\RaspLib\wiringPi-f6c40cb\wiringPi to libwiringPi.so.
I do not know why I change it and why the problem has solved, but it worked! Does someone know the reason??
Re: Cross Compiling Windows
>I do not know why I change it and why the problem has solved, but it worked! Does someone know the reason??
I am not a 100% sure on this, but I suspect the appended «xxx» may have something to do with kernel version number, as linux libraries seem to be rather demanding on exact versioning.
I’ve had similar problems myself, where I had to go through a whole load of renaming and updating files when I upgraded the kernel.
What I do at present is to compile and link on the target, as it is somewhat easier to ensure all its files, source codes, compilers and libraries are up to date.
Re: Cross Compiling Windows
Waking up a dormant thread as I have a very similar issue.
I am trying to cross compile OpenCV320 on Windows for Raspberry Pi Zero (Jessie).
I’ve used the Windows toolchain for the Raspberry Pi from this location (http://gnutoolchains.com/raspberry/) and used the latest version (raspberry-gcc-4.9.2-r4.exe).
I have downloaded, built and installed opencv320 on my raspberry pi and synced the sysroot as well.
I am able to build a very simple hello world program and run it on the Pi but when I try to build the a program and reference the OpenCV libs the linker can’t find the libraries even though they are there on the Windows Host.
The error msg is as follows.
make all
‘Building file: ../src/IPWebcam.cpp’
‘Invoking: Cross G++ Compiler’
arm-linux-gnueabihf-g++ -I»C:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\local\include» -I»C:\OpenCV3200\Unix_Build\install\include» -O0 -g3 -Wall -c -fmessage-length=0 -print-search-dirs -MMD -MP -MF»src/IPWebcam.d» -MT»src/IPWebcam.d» -o «src/IPWebcam.o» «../src/IPWebcam.cpp»
install: c:\sysgcc\raspberry\bin\../lib/gcc/arm-linux-gnueabihf/4.9/
programs: =c:/sysgcc/raspberry/bin/../libexec/gcc/arm-linux-gnueabihf/4.9/;c:/sysgcc/raspberry/bin/../libexec/gcc/arm-linux-gnueabihf/;c:/sysgcc/raspberry/bin/../libexec/gcc/;c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/arm-linux-gnueabihf/4.9/;c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/arm-linux-gnueabihf/;c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/
libraries: =c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/;c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/;c:/sysgcc/raspberry/bin/../lib/gcc/;c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/lib/arm-linux-gnueabihf/4.9/;c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/lib/arm-linux-gnueabihf/;c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/lib/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/lib/arm-linux-gnueabihf/4.9/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/lib/arm-linux-gnueabihf/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/lib/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/usr/lib/arm-linux-gnueabihf/4.9/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/usr/lib/arm-linux-gnueabihf/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/usr/lib/
‘Finished building: ../src/IPWebcam.cpp’
‘ ‘
‘Building target: Hello_World’
‘Invoking: Cross G++ Linker’
arm-linux-gnueabihf-g++ -L»C:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\local\lib» -o «Hello_World» ./src/IPWebcam.o -llibopencv_calib3d -llibopencv_core -llibopencv_highgui -llibopencv_imgcodecs -llibopencv_imgproc -llibopencv_video -llibopencv_videoio -llibopencv_videostab
c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld.exe: cannot find -llibopencv_calib3d
c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld.exe: cannot find -llibopencv_core
c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld.exe: cannot find -llibopencv_highgui
c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld.exe: cannot find -llibopencv_imgcodecs
c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld.exe: cannot find -llibopencv_imgproc
c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld.exe: cannot find -llibopencv_video
c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld.exe: cannot find -llibopencv_videoio
c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld.exe: cannot find -llibopencv_videostab
collect2.exe: error: ld returned 1 exit status
make: *** [Hello_World] Error 1
What I also can’t figure out is that even though I’ve use -L-L»C:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\local\lib» but still using -print-search-dirs gives the following output which shows that the linker is not looking at the path I’ve specified.
libraries: =c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/;c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/;c:/sysgcc/raspberry/bin/../lib/gcc/;c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/lib/arm-linux-gnueabihf/4.9/;c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/lib/arm-linux-gnueabihf/;c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/lib/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/lib/arm-linux-gnueabihf/4.9/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/lib/arm-linux-gnueabihf/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/lib/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/usr/lib/arm-linux-gnueabihf/4.9/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/usr/lib/arm-linux-gnueabihf/;c:/sysgcc/raspberry/bin/../arm-linux-gnueabihf/sysroot/usr/lib/
I’ve updated the ld.config in the toolchain to look at my local/lib on the windows but that didn’t help either.
Out of new ideas.. can anyone point me to what might be the issue here?