I am attempting to build OpenCV 2.3.1 on a 64 bit OSX Mountain Lion machine and can't get past a particular set of "use of undeclared identifier" make errors. I have attempted to build both the taz.gz file and source from Git with the same errors.
Has anyone successfully built 2.3.1 on a OSX Mountain Lion machine? If so, how did you get past the following errors:
opencv/modules/highgui/src/cap_ffmpeg_impl.hpp:486:5: error:
use of undeclared identifier 'av_open_input_file' av_open_input_file(&ic, filename, NULL, 0, NULL);
opencv/modules/highgui/src/cap_ffmpeg_impl.hpp:494:5: error:
use of undeclared identifier 'avcodec_thread_init'avcodec_thread_init(enc, get_number_of_cpus());
opencv/modules/highgui/src/cap_ffmpeg_impl.hpp:524:15: error:
use of undeclared identifier 'av_open_input_file'
int err = av_open_input_file(&ic, _filename, NULL, 0, NULL);
opencv/modules/highgui/src/cap_ffmpeg_impl.hpp:541:9: error:
use of undeclared identifier 'avcodec_thread_init'
avcodec_thread_init(enc, get_number_of_cpus());
As of now I see a couple of options. I could switch to Ubuntu which appears to have an easier build process or I could fix the highgui code.
If you have previous experience building this version I would appreciate the help.
Related
I've got canopen source from canfestival.
I got errors when I built its win32test example on visual stdio,
there wasn't any lib file in file that I downloaded and extracted.
any help would be appreciated.
the errors:
error C2065: 'win32test_obj100C': undeclared identifier
error C2065: 'win32test_obj100D': undeclared identifier
there was a problem in built object dictionary
I make another object dictionary header and source with its .od file in cygwin and the errors gone
There is too much code to post so I'll be short and sweet here.
I'm migrating a project to Visual Studio that I originally built in Eclipse on OSX, using the OpenCV Apple framework distribution (opencv delivered as a .framework).
I've created a visual studio project from the existing code but when I build it, I get a bunch of errors from one of the headers (opencv2/core/fast_math.hpp) that are included along the header chain of <opencv2/opencv.hpp>.
1>c:\users\blah\tools\lib\opencv\build\include\opencv2\core\fast_math.hpp(105):
error C2065: '__m128d': undeclared identifier
1>c:\users\blah\tools\lib\opencv\build\include\opencv2\core\fast_math.hpp(105):
error C2146: syntax error: missing ';' before identifier 't'
1>c:\users\blah\tools\lib\opencv\build\include\opencv2\core\fast_math.hpp(105):
error C2065: 't': undeclared identifier
1>c:\users\blah\tools\lib\opencv\build\include\opencv2\core\fast_math.hpp(105):
error C3861: '_mm_set_sd': identifier not found
1>c:\users\blah\tools\lib\opencv\build\include\opencv2\core\fast_math.hpp(106):
error C2065: 't': undeclared identifier
Nothing has really changed in my code, just that I'm now using Visual Studio 2017. I have added opencv\build\include to my include path. I see that this code is SIMD intrinsics, which I don't think should have any problem compiling.
Is there a step I'm missing here?
This looks to be something with how I set up the project. The SIMD intrinsics require extra headers. I didn't configure the project to use precompiled headers which also appears to explain why std::string was undefined too. The extra headers can be added in stdafx.h and it's presence resolves other missing components.
This is an example of an error that I had when I tried to compile a very simple code.
The code works in Windows, but not in my Mac.
../../../../Qt5.8.0/5.8/clang_64/lib/QtGui.framework/Headers/qabstracttextdocumentlayout.h:103:65:
error: use of undeclared identifier
'Q_NULLPTR'
../../../../Qt5.8.0/5.8/clang_64/lib/QtGui.framework/Headers/qabstracttextdocumentlayout.h:135:63:
error: use of undeclared identifier
'Q_RELOCATABLE_TYPE';
and there are more of errors like this.
I'm trying to build the SDK and am running into an error. Unfortunately google isn't turning up anything specific to my problem. I've already ran "premake4 gmake" and then run mingw32-make, and the below error shows up.
C:\Users\Austin\Documents\programming\opengl\new\glsdk_0_5_2>mingw32-make
==== Building glload (debug) ====
gl_load_cpp.cpp
In file included from include/glload/gl_all.hpp:9:0,
from source/gl_load_cpp.cpp:4:
include/glload/_int_gl_exts.hpp:4840:18: error: declaration does not declare any
thing [-fpermissive]
source/gl_load_cpp.cpp:4181:46: error: expected unqualified-id before '=' token
source/gl_load_cpp.cpp: In function 'void gl::CopyFunctionPointers()':
source/gl_load_cpp.cpp:7501:17: error: expected primary-expression before '=' to
ken
source/gl_load_cpp.cpp:10080:17: error: expected primary-expression before '=' t
oken
Makefile:135: recipe for target 'Debug/gl_load_cpp.o' failed
mingw32-make[1]: *** [Debug/gl_load_cpp.o] Error 1
Makefile:16: recipe for target 'glload' failed
mingw32-make: *** [glload] Error 2
The errors seem to be related to the line, "extern _detail::Proc_glMemoryBarrier MemoryBarrier;", although I have no idea why.
EDIT: I ended up deleting this version of Mingw (supposedly the latest from their site) and downloaded an older version that compiled just fine. Not sure what exactly the issue was but if someone else sees this try this.
I inherited a project that used old opencv, directx and directshow libraries and I'm trying to be able to compile it on a current Windows 7 VS 2010 machine.
Two of the includes that are causing problems are as follows:
#include <iProxyTrans.h>
#include <ProxyTransuids.h>
How can I get this to compile? Are these files simply non-existant now? I tried searching my computer and I could not find it. I have the latest DirectX SDK and Windows SDK. I am also using OpenCV 2.3.1.
edit If I comment these out, I get things such as:
1>someclass.cpp(126): error C2065: 'CLSID_ProxyTransform' : undeclared identifier
1>someclass.cpp(132): error C2065: 'IProxyTransform' : undeclared identifier
1>someclass.cpp(132): error C2065: 'pProxyTrans' : undeclared identifier
1>someclass.cpp(133): error C2065: 'IID_IProxyTransform' : undeclared identifier
Here is where it comes from: ProxyTransuids.h, from OpenCV
// Intel License Agreement
// For Open Source Computer Vision Library