|
Hi all!
I have downloaded 2.0.0 version and built for ARM target: ./configure --host=arm-linux --disable-shared make make install When I try to compile program, g++ -o my_example my_example.cpp `pkg-config opencv --cflags --libs` I get such an error: cc1plus: warning: include location "/usr/local/include/opencv" is unsafe for cross-compilation /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: warning: library search path "/usr/local/lib" is unsafe for cross-compilation /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /usr/local/lib/libcv.a when searching for -lcv /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lcv collect2: ld returned 1 exit status Actually, I check for lib and include locations pkg-config opencv --cflags --libs they seem to be OK: -I/usr/local/include/opencv -L/usr/local/lib -lcv -lhighgui -lcvaux -lml -lcxcore What can be a problem with compilation? -- Borys Bezukladov |
|
One mistake in my previous post -I was trying to compile the program with
string $TARGET-g++ -o hello_arm make.cpp `pkg-config opencv --cflags --libs` On Fri, Dec 3, 2010 at 1:25 PM, Borys Bezukladov <[hidden email] > wrote: > Hi all! > > I have downloaded 2.0.0 version and built for ARM target: > > ./configure --host=arm-linux --disable-shared > make > make install > > > > When I try to compile program, > > g++ -o my_example my_example.cpp `pkg-config opencv --cflags --libs` > > I get such an error: > > cc1plus: warning: include location "/usr/local/include/opencv" is unsafe > for cross-compilation > /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: > warning: library search path "/usr/local/lib" is unsafe for > cross-compilation > /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: > skipping incompatible /usr/local/lib/libcv.a when searching for -lcv > /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: > cannot find -lcv > collect2: ld returned 1 exit status > > Actually, I check for lib and include locations > > pkg-config opencv --cflags --libs > > they seem to be OK: > > -I/usr/local/include/opencv -L/usr/local/lib -lcv -lhighgui -lcvaux -lml > -lcxcore > > What can be a problem with compilation? > -- > Borys Bezukladov > > > -- Borys Bezukladov |
|
I don't know if want a static library, but if so then you might get more of
an idea from looking through some of the methods of compiling OpenCV as a static library for iPhone (ARMv6 and ARMv7): http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en http://ildan.blogspot.com/2008/07/creating-universal-static-opencv.html Cheers, Shervin Emami. http://www.shervinemami.co.cc/openCV.html On Fri, Dec 3, 2010 at 7:39 PM, Borys Bezukladov <[hidden email] > wrote: > > > One mistake in my previous post -I was trying to compile the program with > string > > $TARGET-g++ -o hello_arm make.cpp `pkg-config opencv --cflags --libs` > > > On Fri, Dec 3, 2010 at 1:25 PM, Borys Bezukladov < > [hidden email]> wrote: > >> Hi all! >> >> I have downloaded 2.0.0 version and built for ARM target: >> >> ./configure --host=arm-linux --disable-shared >> >> make >> make install >> >> >> >> When I try to compile program, >> >> g++ -o my_example my_example.cpp `pkg-config opencv --cflags --libs` >> >> I get such an error: >> >> cc1plus: warning: include location "/usr/local/include/opencv" is unsafe >> for cross-compilation >> /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: >> warning: library search path "/usr/local/lib" is unsafe for >> cross-compilation >> /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: >> skipping incompatible /usr/local/lib/libcv.a when searching for -lcv >> /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: >> cannot find -lcv >> collect2: ld returned 1 exit status >> >> Actually, I check for lib and include locations >> >> pkg-config opencv --cflags --libs >> >> they seem to be OK: >> >> -I/usr/local/include/opencv -L/usr/local/lib -lcv -lhighgui -lcvaux -lml >> -lcxcore >> >> What can be a problem with compilation? >> -- >> Borys Bezukladov >> >> >> > > > -- > Borys Bezukladov > > > > |
|
A few things:
1. Where is your cross compiler? Usually it has a name like arm-none-linux-gnueabi-gcc, along with a whole bunch of utilities (linker) similarly named. If you dont have such a thing there are many places to get it for free (e.g., codesourcery, timesys (my employer). 2. If you do have this, your make command probably needs something like: make CROSS_COMPILE=arm-none-linux-gnueabi- (everything up to the name you are used to) ARCH=arm 3. The directory with your cross toolchain needs to be in your path. I always put it first. 4. I haven't tried this with opencv, so the configure step may eliminate this need, in which case I'm at a loss without actually trying it. Hope this helps. --- In [hidden email], Shervin Emami <shervin.emami@...> wrote: > > I don't know if want a static library, but if so then you might get more of > an idea from looking through some of the methods of compiling OpenCV as a > static library for iPhone (ARMv6 and ARMv7): > > http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en > http://ildan.blogspot.com/2008/07/creating-universal-static-opencv.html > > > Cheers, > Shervin Emami. > http://www.shervinemami.co.cc/openCV.html > > > On Fri, Dec 3, 2010 at 7:39 PM, Borys Bezukladov <borys.bezukladov@... > > wrote: > > > > > > > One mistake in my previous post -I was trying to compile the program with > > string > > > > $TARGET-g++ -o hello_arm make.cpp `pkg-config opencv --cflags --libs` > > > > > > On Fri, Dec 3, 2010 at 1:25 PM, Borys Bezukladov < > > borys.bezukladov@...> wrote: > > > >> Hi all! > >> > >> I have downloaded 2.0.0 version and built for ARM target: > >> > >> ./configure --host=arm-linux --disable-shared > >> > >> make > >> make install > >> > >> > >> > >> When I try to compile program, > >> > >> g++ -o my_example my_example.cpp `pkg-config opencv --cflags --libs` > >> > >> I get such an error: > >> > >> cc1plus: warning: include location "/usr/local/include/opencv" is unsafe > >> for cross-compilation > >> /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: > >> warning: library search path "/usr/local/lib" is unsafe for > >> cross-compilation > >> /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: > >> skipping incompatible /usr/local/lib/libcv.a when searching for -lcv > >> /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: > >> cannot find -lcv > >> collect2: ld returned 1 exit status > >> > >> Actually, I check for lib and include locations > >> > >> pkg-config opencv --cflags --libs > >> > >> they seem to be OK: > >> > >> -I/usr/local/include/opencv -L/usr/local/lib -lcv -lhighgui -lcvaux -lml > >> -lcxcore > >> > >> What can be a problem with compilation? > >> -- > >> Borys Bezukladov > >> > >> > >> > > > > > > -- > > Borys Bezukladov > > > > > > > > > |
|
Hi!
1,2,3 was OK. My colleagues succeed with the help of this: http://www.theopenrobotproject.org http://code.google.com/p/embedded-system-training/wiki/PortingOpenCVToARMPlatform Besides, I will try your tools - timesys. Thanks all for help, I hope those links above will also definitely help someone else. --- In [hidden email], "Ed Nash" <ed@...> wrote: > > A few things: > > 1. Where is your cross compiler? Usually it has a name like arm-none-linux-gnueabi-gcc, along with a whole bunch of utilities (linker) similarly named. If you dont have such a thing there are many places to get it for free (e.g., codesourcery, timesys (my employer). > > 2. If you do have this, your make command probably needs something like: make CROSS_COMPILE=arm-none-linux-gnueabi- (everything up to the name you are used to) ARCH=arm > > 3. The directory with your cross toolchain needs to be in your path. I always put it first. > > 4. I haven't tried this with opencv, so the configure step may eliminate this need, in which case I'm at a loss without actually trying it. > > Hope this helps. > > --- In [hidden email], Shervin Emami <shervin.emami@> wrote: > > > > I don't know if want a static library, but if so then you might get more of > > an idea from looking through some of the methods of compiling OpenCV as a > > static library for iPhone (ARMv6 and ARMv7): > > > > http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en > > http://ildan.blogspot.com/2008/07/creating-universal-static-opencv.html > > > > > > Cheers, > > Shervin Emami. > > http://www.shervinemami.co.cc/openCV.html > > > > > > On Fri, Dec 3, 2010 at 7:39 PM, Borys Bezukladov <borys.bezukladov@ > > > wrote: > > > > > > > > > > > One mistake in my previous post -I was trying to compile the program with > > > string > > > > > > $TARGET-g++ -o hello_arm make.cpp `pkg-config opencv --cflags --libs` > > > > > > > > > On Fri, Dec 3, 2010 at 1:25 PM, Borys Bezukladov < > > > borys.bezukladov@> wrote: > > > > > >> Hi all! > > >> > > >> I have downloaded 2.0.0 version and built for ARM target: > > >> > > >> ./configure --host=arm-linux --disable-shared > > >> > > >> make > > >> make install > > >> > > >> > > >> > > >> When I try to compile program, > > >> > > >> g++ -o my_example my_example.cpp `pkg-config opencv --cflags --libs` > > >> > > >> I get such an error: > > >> > > >> cc1plus: warning: include location "/usr/local/include/opencv" is unsafe > > >> for cross-compilation > > >> /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: > > >> warning: library search path "/usr/local/lib" is unsafe for > > >> cross-compilation > > >> /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: > > >> skipping incompatible /usr/local/lib/libcv.a when searching for -lcv > > >> /home/borys/arm-2007q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.0/../../../../arm-none-linux-gnueabi/bin/ld: > > >> cannot find -lcv > > >> collect2: ld returned 1 exit status > > >> > > >> Actually, I check for lib and include locations > > >> > > >> pkg-config opencv --cflags --libs > > >> > > >> they seem to be OK: > > >> > > >> -I/usr/local/include/opencv -L/usr/local/lib -lcv -lhighgui -lcvaux -lml > > >> -lcxcore > > >> > > >> What can be a problem with compilation? > > >> -- > > >> Borys Bezukladov > > >> > > >> > > >> > > > > > > > > > -- > > > Borys Bezukladov > > > > > > > > > > > > > > > |
| Powered by Nabble | Edit this page |
