c++ - Xcode: cstdlib no member named "xxx" in the global namespace -
i spent 2hours google answer, im still not able solve it. tips on how resolve it?
i change search path inform xcode opencv locates. here's search paths:
framework search path: /usr/local/lib library search path: /usr/local/cellar/opencv/2.4.11/lib /usr/local/cellar/opencv/2.4.11_1/lib /user/local/lib header search path: /applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/include /usr/local/include
the errors:
in file included /users/lilisun/documents/opencv_projects/faceextractor/faceextractor/main.cpp:8: in file included /usr/local/include/opencv2/objdetect/objdetect.hpp:46: in file included /usr/local/include/opencv2/core/core.hpp:49: in file included /usr/local/include/opencv2/core/types_c.h:55: in file included /applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.10.sdk/usr/include/assert.h:44: in file included /usr/local/include/c++/5.1.0/tr1/stdlib.h:32: in file included /usr/local/include/c++/5.1.0/tr1/cstdlib:34: /usr/local/include/c++/5.1.0/cstdlib:118:11: error: no member named 'div_t' in global namespace using ::div_t; ~~^ /usr/local/include/c++/5.1.0/cstdlib:119:11: error: no member named 'ldiv_t' in global namespace using ::ldiv_t; ~~^ /usr/local/include/c++/5.1.0/cstdlib:121:11: error: no member named 'abort' in global namespace using ::abort; ~~^ /usr/local/include/c++/5.1.0/cstdlib:122:11: error: no member named 'abs' in global namespace using ::abs; ~~^ /usr/local/include/c++/5.1.0/cstdlib:123:11: error: no member named 'atexit' in global namespace using ::atexit; ~~^ /usr/local/include/c++/5.1.0/cstdlib:129:11: error: no member named 'atof' in global namespace using ::atof; ~~^ /usr/local/include/c++/5.1.0/cstdlib:130:11: error: no member named 'atoi' in global namespace using ::atoi; ~~^ /usr/local/include/c++/5.1.0/cstdlib:131:11: error: no member named 'atol' in global namespace using ::atol; ~~^ /usr/local/include/c++/5.1.0/cstdlib:132:11: error: no member named 'bsearch' in global namespace using ::bsearch; ~~^ /usr/local/include/c++/5.1.0/cstdlib:133:11: error: no member named 'calloc' in global namespace using ::calloc; ~~^ /usr/local/include/c++/5.1.0/cstdlib:134:11: error: no member named 'div' in global namespace using ::div; ~~^ /usr/local/include/c++/5.1.0/cstdlib:135:11: error: no member named 'exit' in global namespace using ::exit; ~~^ /usr/local/include/c++/5.1.0/cstdlib:136:11: error: no member named 'free' in global namespace using ::free; ~~^ /usr/local/include/c++/5.1.0/cstdlib:137:11: error: no member named 'getenv' in global namespace using ::getenv; ~~^ /usr/local/include/c++/5.1.0/cstdlib:138:11: error: no member named 'labs' in global namespace using ::labs; ~~^ /usr/local/include/c++/5.1.0/cstdlib:139:11: error: no member named 'ldiv' in global namespace using ::ldiv; ~~^ /usr/local/include/c++/5.1.0/cstdlib:140:11: error: no member named 'malloc' in global namespace using ::malloc; ~~^ /usr/local/include/c++/5.1.0/cstdlib:142:11: error: no member named 'mblen' in global namespace using ::mblen; ~~^ /usr/local/include/c++/5.1.0/cstdlib:143:11: error: no member named 'mbstowcs' in global namespace using ::mbstowcs; ~~^ fatal error: many errors emitted, stopping [-ferror-limit=] 20 errors generated.
i find mistake made. in header search path: use /usr/local/include
recursive. after change /usr/local/include non-recursive
/usr/local/include/opencv non-recursive
/usr/local/include/opencv2 non-recursive
it works. still don't know why recursion version cause errors.
Comments
Post a Comment