Ask Your Question
0

I am not able to build my opencv project in eclipse [closed]

asked 2018-05-03 02:02:40 -0600

Nimya gravatar image

updated 2018-05-03 02:05:48 -0600

berak gravatar image

OS : macOs High Sierra

Using OpenCV in Eclipse

I have included the libraries and include files of Opencv in project properties. Yet while building Following error shows

12:22:05 * Incremental Build of configuration Release for project SampleImage *

make all

Building file: ../Main.cpp

Invoking: GCC C++ Compiler

g++ -I/usr/local/Cellar/opencv/3.4.1_2/include -I/Library/Developer/CommandLineTools/usr/include -I/Library/Developer/CommandLineTools/usr/include/c++/v1 -O3 -Wall -c -fmessage-length=0 -std=c++11 -MMD -MP -MF"Main.d" -MT"Main.o" -o "Main.o" "../Main.cpp"

In file included from ../Main.cpp:1:

/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:111:82: error: use of undeclared identifier 'labs'; did you mean 'abs'?

inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} ^

/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:111:44: note: 'abs' declared here inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} ^

/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:113:81: error: use of undeclared identifier 'llabs' inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} ^

/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:116:35: error: unknown type name 'ldiv_t' inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);} ^

/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:116:95: error: use of undeclared identifier 'ldiv'; did you mean 'div'?

inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);} ^

/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:116:42: note: 'div' declared here inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);} ^

/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:118:34: error: unknown type name 'lldiv_t' inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);} ^

/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:118:94: error: use of undeclared identifier 'lldiv' inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);} ^

In file included from ../Main.cpp:3:

/Library/Developer/CommandLineTools/usr/include/c++/v1/math.h:733:41: error: no member named 'fabsf' in the global namespace

abs(float __lcpp_x) _NOEXCEPT {return ::fabsf(__lcpp_x);} ~~^

/Library/Developer/CommandLineTools/usr/include/c++/v1/math.h:737:42: error: no member named 'fabs' in the global namespace; did you mean 'abs'? abs(double __lcpp_x) _NOEXCEPT {return ::fabs(__lcpp_x);} ~~^

/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:111:44: note: 'abs' declared here inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} ^

Other C++ program is working perfectly in Eclipse and I have checked Xcode also and i was able to develop application in xcode that too opencv application

Can any one help me in identifying the issue ??

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Nimya
close date 2018-05-10 10:05:38.443548

Comments

How you compile OpenCV? With VC? MinGW?

lezan gravatar imagelezan ( 2018-05-03 03:33:21 -0600 )edit

I am using Mac and code run through Eclipse C/C++ by including its libraries in project

Nimya gravatar imageNimya ( 2018-05-03 05:53:59 -0600 )edit

I get it, but how do you install opencv on your machine? Do you compile it or get binary from site?

lezan gravatar imagelezan ( 2018-05-03 06:39:46 -0600 )edit

Using Homebrew

Nimya gravatar imageNimya ( 2018-05-04 02:38:28 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-05-10 10:04:46 -0600

Nimya gravatar image

updated 2018-05-10 10:05:13 -0600

solved by reinstalling ECLIPSE. Thanks you!!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-05-03 02:02:40 -0600

Seen: 794 times

Last updated: May 10 '18