Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build on Windows #18

Open
akulapid opened this issue Jan 10, 2011 · 6 comments
Open

Unable to build on Windows #18

akulapid opened this issue Jan 10, 2011 · 6 comments

Comments

@akulapid
Copy link

I'm trying to build this on Windows using cygwin with ndk r5 and sdk 2.1/2.2. I have OpenCV 2.2 installed and in PATH as well. I get the following error.

StaticLibrary  : libcvhighgui.a
SharedLibrary  : libopencv.so
E:/dev/android-ndk-r5/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: cannot find - lcxcore
collect2: ld returned 1 exit status
make: *** [/cygdrive/e/code/droid/billmcord/first-push/OpenCV-Android/obj/local/armeabi/libopencv.so] Error 1
@billmccord
Copy link
Owner

Having OpenCV 2.2. installed and in PATH is irrelevant. We use OpenCV 1.1 pre for this project and the source is already included and built when you build. Someone else has also reported the same problem you are running into, but unfortunately I don't have a Windows machine to debug this. The other person eventually gave up and used Linux to build. If that isn't an option for you, then I would appreciate your help investigating. Here are the instructions I gave to the other person:

Everything built except for the opencv module which requires linking to all of the other libraries. The only thing I can guess is that one of two things is happening:

* On your machine TARGET_OUT is not pointing to [ROOT OF OPENCV PRJ]/obj/local/armeabi
      o You might try hard-coding the path in there and removing -L$(TARGET_OUT).  See if that works.  If it doesn't then the other problem might be...
* ld.exe isn't respecting that -lcxcore is a reference to libcxcore.a
      o You might try reading the documentation for ld.exe and see if there are some rules that are different about the Windows implementation from the Linux / Mac implementation.

Let me know if you make any progress as I would like to warn others.

@brnhffmnn
Copy link

I struggled with this for way to long now and finally it worked. Setting the search path with -L to an absolute path instead of TARGET_OUT helped.

LOCAL_LDLIBS := -L $(SYSROOT)/usr/lib -l dl -l log \
        -L "D:\OpenCV-Android\obj\local\armeabi" \
        -l cxcore -l cv -l cvaux -l cvml -l cvhighgui

@Xirus
Copy link

Xirus commented Aug 7, 2011

Hello
I had the same problem and this solution helped me out...
I just wonder if is there a neater way to do it...
thanks

@billmccord
Copy link
Owner

Xirus,

I'm stuck on Android 1.6 platform because the project I am working on requires it for now. You might want to look at the official OpenCV project by Willow Garage if you are able to use newer versions of Android.
http://opencv.willowgarage.com/wiki/Android

@Xirus
Copy link

Xirus commented Aug 7, 2011

Thanks - I will have a look.
Another problem:
I am trying the open the OpenCVSample project with eclipse.
I just started with Android so perhaps I am doing something wrong.
Thanks
Jay

-----Original Message-----
From: billmccord [mailto:[email protected]]
Sent: Sunday, August 07, 2011 1:49 AM
To: [email protected]
Subject: Re: [OpenCV-Android] Unable to build on Windows (#18)

Xirus,

I'm stuck on Android 1.6 platform because the project I am working on requires it for now. You might want to look at the official OpenCV project by Willow Garage if you are able to use newer versions of Android.
http://opencv.willowgarage.com/wiki/Android

Reply to this email directly or view it on GitHub:
#18 (comment)

@billmccord
Copy link
Owner

You haven't described the problem you are seeing? You are trying to open the OpenCVSample and ... what?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants