Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
1,965 Views

Question regarding Yocto tiny linux image

Sir i hav compiled and runned C C++ programs using the yocto linux tiny which supports Arduino ide also ...but when i tried to do so with open cv related programs like this

g++ opencv_ex1.cpp 'pkg-config opencv --cflags --libs' -o opencv_ex1 it showed me

pkg-config opencv --cflags --libs: No such file or directory

 

so i thought to search files and i see that there are opencv related files in /usr/lib/

 

 

 

i don't know how to make use of these libraries please help me....!!!!

 

 

 

 

 

0 Kudos
18 Replies
Highlighted
10 Views

I know the images typically don't come with manpages installed. But you can search the internet for "man g++" and should find hits like http://linux.die.net/man/1/g++ g++(1): GNU project C/C++ compiler - Linux man page

There you can find a section "Options for linking"

Wihin there you can find:

"

-llibrary

-l

librarySearch the library named

library when linking. (The second alternative with the library as a separate argument is only for

POSIX compliance and is not recommended.)

It makes a difference where in the command you write this option; the linker searches and processes libraries and object files in the order they are specified. Thus,foo.o -lz bar.o searches library z after file foo.o but before bar.o. If bar.o refers to functions in z, those functions may not be loaded.

The linker searches a standard list of directories for the library, which is actually a file named liblibrary.a. The linker then uses this file as if it had been specified precisely by name.

"

In particular there is no such option "--libs" and also no such option "--cflags"

0 Kudos
Highlighted
Honored Contributor II
10 Views

That error comes from pkg-config command inserted in backticks into the g++ command line.

NithishChauhan, you need to install "opencv-dev" package for pkg-config to work like that, it's available in my http://alextgalileo.altervista.org/package-repo-configuration-instructions.html package repo

Highlighted
10 Views

thanks AlexT_Intel - - sorry,I missed that part. Was just looking at "g++ --libs"

0 Kudos
Highlighted
New Contributor I
10 Views

i didn't get that sir ....sir i need to install 'opencv-dev ' how...?

how to install these repos on galileo after getting them downloaded...?

sir please explain....!!

0 Kudos
Highlighted
New Contributor I
10 Views

Sir i want both OpenCV to be executed C++ on galileo along with arduino compatibility via Arduino ide...

0 Kudos
Highlighted
Honored Contributor II
10 Views

NithishChauhan, go to this page: http://alextgalileo.altervista.org/package-repo-configuration-instructions.html http://alextgalileo.altervista.org/package-repo-configuration-instructions.html Configure the package repo connection as described there. Then run "opkg update" and make sure you get the expected output (also listed on that page). After that run "opkg install opencv-dev" to install the package you need for such compilation you ask about in the first post.

0 Kudos
Highlighted
New Contributor I
10 Views

Sir i did like u said in that page i mean "Galileo configuration instructions:" but got error like wget 'http:...' bad download address

so downloaded all the necessary packages in my PC and copied it to a folder in SD card ....and then via SSH i ran this command in that directory like this

" opkg install *.ipk" i got almost all installed except for few it was unsuccessful.......anyhow i did compile the opencv program written in C++ like "g++ opencv_ex1.cpp 'pkg config opencv --cflags --libs' opencv_ex1" and got the result .........i am very much impressed with this board.....it took around 5 min to compile but took less than a second to execute binaries.......i got the result as expected .....Thank you sir without those packages this would have not been possible............Thanks a lot

One question sir can this galileo linux image environment be simulated like in virtual machine....? so that compilation happens bit faster..........?

0 Kudos
Highlighted
New Contributor I
10 Views

Sir in the morning i successfully compiled the opencv C++ code and got the binary file which is still getting executed producing "result.jpg " each time i run it.........

But i don't know what happened ,, in evening i just changed the name of input image and wanted to test with HD image but its not getting compiled

please see the below image

as u can see its showing like 'No such file or directory for 'pkg-config opencv --cflags --libs ' but when i type in pkg-config opencv --cflags --libs as command it lists all opencv related files ......Please help me compile i am getting error every time ....for compilation..............Please help me out sir..........

0 Kudos
Highlighted
Honored Contributor II
10 Views

NithishChauhan, answering your prvious question, there's no VM image available for something like a Galileo simulator (though I think that should be possible with qemu and some time spent on configuring it properly), however there's something called "cross-compilation toolchain", which is in the Downloads section of this community. It's available for Linux, Windows and Mac, you just download it, unpack/install and you can compile programs for Galileo on your normal PC.

As far as the error is concerned, the images are blurred (by the way, why don't you just copy and paste the text from the terminal? I guess making and uploading photos is more hassle than that), but it looks to me like you're using single quotation marks instead of backticks in that command, so it doesn't work.

It should be

g++ `pkg-config opencv --cflags --libs` -o opencv_ex2

0 Kudos
Highlighted
New Contributor I
10 Views

Yes sir you were right .....the problem was with quotes and its solved now thank you sir it worked successfully ........can u please help me out with cross compiler toolchain...i have downloaded it and extracted all windows related files but i am not getting how to get it to work .....can u please guide me...?.......

0 Kudos
Highlighted
Honored Contributor II
10 Views

Check out this thread: /message/247829# 247829 https://communities.intel.com/message/247829# 247829

It's about the Linux version of the toolchain, but the Windows one is very similar. I'm downloading it now and will add a post later with more details.

0 Kudos
Highlighted
Honored Contributor II
10 Views

Okay, looks like you'll need to install Cygwin (with bash, tar and gzip, at least) or a similar emulator first as the toolchain is still UNIX-like with scripts using the *nix paths notation.

  1. Start Cygwin bash shell
  2. Create a /opt/poky-edison/1.6 directory by running

     

    mkdir -p /opt/poky-edison/1.6
  3. Unpack the contents of the toochain archive and put it into the dir you created (the below is for 32-bit toolchain, adjust accordingly for 64 bit).

     

    cd /path/to/download/dir

     

    unzip edison-sdk-win32-weekly-68.zip

     

    cd /opt/poky-edison/1.6

     

    tar xjvf /path/to/download/dir/poky-edison-eglibc-i686-edison-image-core2-32-toolchain-1.6.tar.bz2
  4. After that set up environment variables by running

     

    source /poky-edison/1.6/environment-setup-core2-32-poky-linux
  5. And now you can compile stuff by running

     

    ${CC} testfile.c -o testprogram

Something along these lines. Now I haven't actually run those steps myself, so there may be small omissions, feel free to post any further problems you face in this thread and we'll sort them out.

0 Kudos
Highlighted
New Contributor III
10 Views

Intel Galileo Gen 2 Eurobot videos :-

https://plus.google.com/u/0/116374697724603787600/videos annu shah - Videos - Google+

i used the same steps :-

made a connection with linux

Run "opkg update"

Run "opkg install opencv-dev"

 

then i compiled the cpp file with the following command :-

 

g++ shah.cpp `pkg-config opencv --cflags --libs` -o shah

 

but i get this error :-

 

/usr/lib/gcc/i586# 32379982 by RoyalAds"> poky-linux-uclibc/4.7.2/../../../../i586-poky-linux-uclibc/bin/ld: cannot find -lopencv_ts

collect2: error: ld returned 1 exit status

 

 

i am using galileo gen 2 and the linux is loaded from the sd card "Poky 9.0.2 (Yocto Project 1.4 Reference Distro) 1.4.2 clanton"

 

Regards

Annu shah

 

0 Kudos
Highlighted
Honored Contributor II
10 Views

Looks like you actually need to install two packages to be able to compile such a program: opencv-dev and opencv-staticdev. The first one contains the necessary headers and the pkgconfig file, while the second one has the library itself (libopencv_ts.a).

0 Kudos
Highlighted
New Contributor III
10 Views

Thank you sir this is the solution.

Just to help others in order to install open cv just run these commands :-

opkg update

opkg install opencv-dev

opkg install opencv-staticdev

use these commands to run the file :-

g++ filename.cpp `pkg-config opencv --cflags --libs` -o filename

./filename

0 Kudos
Highlighted
New Contributor III
10 Views

hi

now in my code i am accessing the webcam using the "VideoCapture cap(0); " its not working.Basically i am using logilink webcam.when i connect it to the board i dnt see any ./dev message.

also i have checked the uvcdriver,it is also installed cant find the error i have also read a few questions and answer on the community but no luck.

Regards

Annu shah

0 Kudos
Highlighted
Honored Contributor II
10 Views

I'd recommend you to start a new thread on this, I think it has nothing to do with the current one.

And I'd highly recommend to start with searching - the topic of connecting a webcam was discussed many times already, so you should be able to find step-by-step instructions.

0 Kudos
Highlighted
New Contributor III
10 Views

yes i realized it sorry this is the link :-

0 Kudos