Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7808837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:14:55+00:00 2026-06-02T03:14:55+00:00

The problem written below the line is solved but i m facing a new

  • 0

The problem written below the line is solved but i m facing a new related problem.
Slightly different from before, I am compiling and linking the sample OpenCV code as:

g++ facedetect.cpp -o facedetection -I /home/harsh/Downloads/OpenCV-2.0.0/include/opencv/ -L/home/harsh/Downloads/OpenCV-2.0.0/lib/ -lcv -lcxcore -lcvaux -lml -lhighgui

That doesn’t give any errors now, but when I run the executable using

./facedetection

i get this error:

./facedetection: error while loading shared libraries: libcv.so.2.0: cannot open shared object file: No such file or directory

And when I do symbolic linking, using:

ln -s libcv.so libcv.so.2.0

Then the error is:

ln: failed to create symbolic link 'libcv.so.2.0': File exists

Don’t know how to get around this.

Thanks in advance..

IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII

I am trying to create a linux executable of a sample OpenCV program that will be linked dynamically with .so files and will be executed on a machine where OpenCV is not installed, but the .so files will be present on that linux machine.

I have searched many posts regarding this but still am unsuccessful.

I compiled opencv like this:

cd OpenCV-2.0.0/
cmake -DBUILD_SHARED_LIBS=ON .
make

Then all the compiled libraries were created in OpenCV-2.0.0/lib

Then, in the samples/c directory, I did this:

g++ facedetect.cpp -o facedetection -I /home/harsh/Downloads/OpenCV-2.0.0/include/opencv/ -L/home/harsh/Downloads/OpenCV-2.0.0/lib/ -llibcv -llibcxcore -llibcvaux -llibml -llibhighgui

But Errors are :

/usr/bin/ld: cannot find -llibcv
/usr/bin/ld: cannot find -llibcxcore
/usr/bin/ld: cannot find -llibcvaux
/usr/bin/ld: cannot find -llibml
/usr/bin/ld: cannot find -llibhighgui
collect2: ld returned 1 exit status
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:14:57+00:00Added an answer on June 2, 2026 at 3:14 am

    Use -lcv, -lcxcore, etc.

    To link to libfoo.so, the flag is -lfoo, without the lib part.

    If your libraries aren’t in the default runtime library search path (how this is set/managed depends on your OS and distribution), you need to inform the dynamic linker as to where they are located. (Just like you have to do so when you compile by adding -L flags.)

    On Linux, this is done by setting the environment variable LD_LIBRARY_PATH, e.g.:

    export LD_LIBRARY_PATH=/home/harsh/Downloads/OpenCV-2.0.0/lib/:$LD_LIBRARY_PATH
    ./your_app
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

authentication problem on windows vista (iis7) (cookie is getting written but httpcontext.current.user is null)
I have a problem with the Jakarta Commons HttpClient. Before my self-written HttpServer gets
I have written code below.but it will print this exception and i really don't
I have a small problem with a code written below. VS 2010 compiles it,
I am having this problem that when I run the below written code in
I'm having a problem with some code I've written. I've had to anonymize it,
Hi guys i've never written a comparator b4 and im having a real problem.
I'm trying to debug a problem in a DLL written in C that keeps
My company is running into a problem with a web service that is written
I'm having a bit of a problem because neither Javascript nor ActiveX (written in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.