Cannot open include file: 'iProxyTrans.h' - old Directshow project? - c++

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

Related

Using vcpkg and compiling in Visual Studio 2015

I am trying to compile (by porting) some code in Windows 10 that was originally developed for Linux.
The code depends on 2 external libraries: cppkafka and librdkafka.
I saw that vcpkg is able to get the libraries, compile them, and then make them automatically available in Visual Studio 2015 (through the vcpkg integrate install command).
I see that the vcpkg compiles the dependencies for windows 64 (cppkafka and librdkafka) properly, as the .dll, .lib... are all made available on the install folder of vcpkg.
When I try compiling my code in Visual Studio 2015, I see errors concerning the dependencies headers, which for me is unexpected. If vcpkg compiled them, why Visual Studio doesn't? From the vcpkg documentation, I assume they use the same compiler. Next I show some example errors I am getting:
1>------ Build started: Project: AndreKafkaDriver, Configuration: Release x64 ------
1>C:\...\vcpkg\installed\x64-windows\include\librdkafka/rdkafka.h(64): error C2371: 'ssize_t': redefinition; different basic types
1> C:\Siemens\Automation\WinCC_OA\3.16\api\include\winnt\win32.h(47): note: see declaration of 'ssize_t'
1>c:\...\vcpkg\installed\x64-windows\include\cppkafka\header_list.h(265): warning C4267: 'argument': conversion from 'size_t' to 'ssize_t', possible loss of data
1>C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2065: 'queue1': undeclared identifier
1>C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2065: 'queue2': undeclared identifier
1>C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2065: 'mutex': undeclared identifier
1>C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2275: 'std::mutex': illegal use of this type as an expression
1>C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): note: see declaration of 'std::mutex'
1>C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2182: 'swap_queues': illegal use of type 'void'
1>C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2470: 'cppkafka::BufferedProducer<BufferType,Allocator>::swap_queues': looks like a function definition, but there is no parameter list; skipping apparent body
1>C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2072: 'cppkafka::BufferedProducer<BufferType,Allocator>::swap_queues': initialization of a function
1>kafkaHWService.cxx(29): fatal error C1083: Cannot open include file: 'execinfo.h': No such file or directory
...
Thanks in advance,
Nerea

building example of canopen from canfestival error

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

Why is my code not compiling when including OpenCV in my Visual Studio Project?

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.

Errors building Freetype application with Visual Studio

I've been going bonkers the last week on this problem.
Microsoft Visual Studio Community 2013
Freetype 2.5.5
Windows 8.1
Building as C++ application
I've been trying to build against a static library for Freetype, I've tried after building the lib using the included VC2010 project and also downloading a pre-built library with no luck. I always get the same errors below. I've tried with multiple examples and the same. I'm able to successfully compile and link against the lib using gcc (after building a .a library), this problem seems to be isolated to Visual Studio..
1>f:\audio\libs\header\freetype\fterrdef.h(35): error C2143: syntax error : missing '}' before '('
1>f:\audio\libs\header\freetype\fterrdef.h(35): error C2143: syntax error : missing ';' before '<L_TYPE_raw>'
1>f:\audio\libs\header\freetype\fterrdef.h(35): error C2059: syntax error : '<L_TYPE_raw>'
1>f:\audio\libs\header\freetype\fterrors.h(164): error C2143: syntax error : missing ';' before '}'
1>f:\audio\libs\header\freetype\fterrors.h(177): error C2059: syntax error : '}'
1>f:\audio\libs\header\freetype\fterrors.h(177): error C2143: syntax error : missing ';' before '}'
1>f:\audio\libs\header\freetype\freetype.h(38): error C2143: syntax error : missing ';' before '{'
1>f:\audio\libs\header\freetype\freetype.h(38): error C2447: '{' : missing function header (old-style formal list?)
Example code that can cause this error:
#include <windows.h>
#include <ft2build.h>
#include FT_FREETYPE_H
int main(int argc, char **argv)
{
return 0;
}
I had the same issue while building FreeType2 in VS2013 with VS2013 toolset (SDK). No Google results seem to have answer to this so far so I thought I'd share even though the thread is bit old (but the problem is still recent! FreeType ver. 2.6 still suffers from the same problem).
For reference, this can be reproduced by minimal example:
#include <ft2build.h>
#include FT_FREETYPE_H
FT_Library library;
So the problem and solution is quite simple but was unfortunately buried in output log and wasn't that obvious at first glimpse so it needed some investigation.
There is a clash with header names between FreeType2 library and Windows SDK, namely with the fttypes.h file which gets dragged in from:
C:\Program Files (x86)\Windows Kits\8.1\Include\shared\fttypes.h
Instead, VS should include FT2 header that is located in:
your_FT2_root\include\fttypes.h
This is easy to workaround - in your Project Properties (Alt+F7) rearrange header search paths so FreeType2 path is first (for me bringing FT2 at the top worked like a charm).
Hope this helps!
Cheers,
Henryk

error C2065: 'errno' : undeclared identifier in <string> in Visual Studio 2012

I had a project running in Visual Studio 2010. Now I am using Visual Studio 2012.
Now I am getting below error while building the project.
I have looked into Google and SO as well. But no where I got any solution.
c:\program files\microsoft visual studio 11.0\vc\include\string(557): error C2065: 'errno' : undeclared identifier
2>c:\program files\microsoft visual studio 11.0\vc\include\string(557): error C2065: 'errno' : undeclared identifier
2>c:\program files\microsoft visual studio 11.0\vc\include\string(562): error C2065: 'errno' : undeclared identifier
2>c:\program files\microsoft visual studio 11.0\vc\include\string(574): error C2065: 'errno' : undeclared identifier
2>c:\program files\microsoft visual studio 11.0\vc\include\string(579): error C2065: 'errno' : undeclared identifier
I have tried with including stdlib.h into the sting header file but still I am getting this same error.
Any help appreciated.
There could be several possible reasons for this problem. The
first thing you should do is to create a one line source:
#include <string>
and nothing else, and try to compile it. If this doesn't
compile, there is a problem with your installation, and you
should reinstall it. Then, just to be sure, delete everything
in your source tree except the actual sources, project files and
solution, and rebuild. There may be some old files laying
around which are somehow causing the problem. I doubt it, but
this is something you should do anyway, any time you upgrade
a compiler, or even just install a patch. (If you've got
everything under source code control, which you should, the
simplest solution is just to delete everything, and do a new,
clean checkout.)
If these measures don't solve the problem (and somehow,
I suspect they won't), there's a problem in your code base
somewhere. errno is required to be a macro by the standard;
to get the error message you cite, the macro must be undefined.
<string> includes (indirectly) a file which defines it. Given
this, the only cause I can think of is that an earlier include
file has already included a file which defines errno, and then
#undefed it. To verify this, put your #include <string> as
the very first include of your source, and see if this solves
the problem. If it does, then you have to find the file which
does the #undef, and fix it.
I had the same issue. Strangely enough, the problem was not including "using namespace std;" under the header file includes. Apparently, program would recognize "string" unless I did this, even though "char", "float", etc were recognized.