I'm struggling to build/link Vivek's Vcam / Capture Source Filter on Windows 10 with Visual Studio 2019 (Version 16.5.5) for x64 platforms.
(I have already built the BaseClasses project with no issues.)
These are the current building errors:
>Dll.cpp
>(folder)\vsprojects\sdk7samples\baseclasses\transip.h(214,55): error C4596: 'Copy': illegal qualified name in member declaration
>(folder)\vsprojects\sdk7samples\baseclasses\videoctl.h(54,44): error C2385: ambiguous access of '{dtor}'
>(folder)\vsprojects\sdk7samples\baseclasses\videoctl.h(54,44): message : could be the '{dtor}' in base 'IDirectDraw'
>(folder)\vsprojects\sdk7samples\baseclasses\videoctl.h(54,44): message : or could be the '{dtor}' in base 'CUnknown'
>(folder)\vsprojects\sdk7samples\baseclasses\videoctl.h(54,47): error C3254: 'CAggDirectDraw': class contains explicit override '{dtor}' but does not derive from an interface that contains the function declaration
>(folder)\vsprojects\sdk7samples\baseclasses\videoctl.h(54,47): error C3244: 'CAggDirectDraw::~CAggDirectDraw(void)': this method was introduced by '<Unknown>' not by 'IDirectDraw'
>(folder)\references\vcam\Filters\Dll.cpp(48,5): error C2440: 'initializing': cannot convert from 'const wchar_t [7]' to 'LPWSTR'
>(folder)\references\vcam\Filters\Dll.cpp(48,5): message : Conversion from string literal loses const qualifier (see /Zc:strictStrings)
>Filters.cpp
>(folder)\vsprojects\sdk7samples\baseclasses\transip.h(214,55): error C4596: 'Copy': illegal qualified name in member declaration
>(folder)\vsprojects\sdk7samples\baseclasses\videoctl.h(54,44): error C2385: ambiguous access of '{dtor}'
>(folder)\vsprojects\sdk7samples\baseclasses\videoctl.h(54,44): message : could be the '{dtor}' in base 'IDirectDraw'
>(folder)\vsprojects\sdk7samples\baseclasses\videoctl.h(54,44): message : or could be the '{dtor}' in base 'CUnknown'
>(folder)\vsprojects\sdk7samples\baseclasses\videoctl.h(54,47): error C3254: 'CAggDirectDraw': class contains explicit override '{dtor}' but does not derive from an interface that contains the function declaration
>(folder)\vsprojects\sdk7samples\baseclasses\videoctl.h(54,47): error C3244: 'CAggDirectDraw::~CAggDirectDraw(void)': this method was introduced by '<Unknown>' not by 'IDirectDraw'
>Done building project "vcam.vcxproj" -- FAILED.
On C++ additional include directories I have "..\sdk7samples\baseclasses\;%(AdditionalIncludeDirectories)".
On Linker's additional library directories I have "..\sdk7samples\baseclasses\x64\Release\;%(AdditionalLibraryDirectories)".
On Linker's addidional dependencies I added strmbasd.lib (debug profile) / strmbase.lib (release profile).
Any suggestions? Thanks!
Try to disable "Conformance mode" in properties(From Yes(/permissive-) to No).
I can reproduce this issue and then get it compile after disable it.
This compiler option is set by default in Visual Studio 2017 version 15.5 and later, but it is not set by default in earlier versions.
According to the /permissive document:
By default, the /permissive- option is set in new projects created by
Visual Studio 2017 version 15.5 and later versions. It's not set by
default in earlier versions. When the option is set, the compiler
generates diagnostic errors or warnings when non-standard language
constructs are detected in your code, including some common bugs in
pre-C++11 code.
...Older versions of the SDK may fail to compile under /permissive-
for various source code conformance reasons.
Related
Trying to build this plugin from source but using Visual Studio 2017:
https://github.com/david-cattermole/mayaMatchMoveSolver/blob/master/BUILD_WINDOWS.md
I followed its directions except i have been using x64_x86 Cross Tools Command Prompt for VS 2017, but I keep getting these errors when attempting to build
preview of errors:
13>------ Build started: Project: mmSolver, Configuration: Debug x64 ------
13>Building Custom Rule C:/Users/Desktop02/Documents/mayaMatchMoveSolver2017/CMakeLists.txt
13>pluginMain.cpp
13>C:\MinGW\include\stdio.h(38): warning C4068: unknown pragma
13>C:\MinGW\include\msvcrtver.h(35): warning C4068: unknown pragma
13>C:\MinGW\include\w32api.h(35): warning C4068: unknown pragma
13>C:\MinGW\include\sdkddkver.h(35): warning C4068: unknown pragma
13>C:\MinGW\include\w32api.h(184): warning C4005: '_EXTERN_C' : macro redefinition
13> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h(472) : see previous definition of '_EXTERN_C'
13>c:\mingw\include\sys/types.h(34): warning C4068: unknown pragma
13>C:\MinGW\include\stdio.h(260): error C2143: syntax error : missing ';' before '*'
13>C:\MinGW\include\stdio.h(260): warning C4229: anachronism used : modifiers on data are ignored
13>C:\MinGW\include\stdio.h(260): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
13>C:\MinGW\include\stdio.h(260): error C2377: 'FILE' : redefinition; typedef cannot be overloaded with any other symbol
13> C:\MinGW\include\stdio.h(220) : see declaration of 'FILE'
13>C:\MinGW\include\stdio.h(261): error C2143: syntax error : missing ';' before '*'
13>C:\MinGW\include\stdio.h(261): warning C4229: anachronism used : modifiers on data are ignored
13>C:\MinGW\include\stdio.h(261): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
13>C:\MinGW\include\stdio.h(261): error C2061: syntax error : identifier 'FILE'
13>C:\MinGW\include\stdio.h(262): error C2062: type 'int' unexpected
13>C:\MinGW\include\stdio.h(263): error C2062: type 'int' unexpected
full error:
https://pastebin.com/HzxLed93
and I get similar looking errors using Visual Studio 2012 Update 5 as described in the doc (maybe without the ones concerning stdio.h).
I just really have no idea how to troubleshoot this further, so if anyone can provide some assistance/insight would be appreciated...
Some details:
CMake 3.17.3
Python 2.7.12
Maya version:
Operating System: Microsoft Windows 7 Business Edition, 64-bit Windows 7 Service Pack 1 (Build 7601)
Cut ID: 201603022110-988944-2
Maya Version: Autodesk Maya 2016 Extension 2
Maya API: 201650
Qt Version: 4.8.6
Compositing Manager: True
Window Manager: Windows Aero
GPU: Version : 2015.11.4.11. Feature Level 5.
Adapter : GeForce GTX 560 Ti/PCIe/SSE2
Vendor ID: 4318. Device ID : 4608
Driver : nvoglv64.dll:23.21.13.9135.
API : OpenGL V.4.6.
Max texture size : 16384 * 16384.
Max tex coords : 32
Shader versions supported (Vertex: 5, Geometry: 5, Pixel 5).
Shader compiler profile : (Best card profile)
Active stereo support available : 0
GPU Memory Limit : 1024 MB.
CPU Memory Limit: 31107 MB.
EDIT: I was looking at this thread in search of similar looking errors:
https://forum.zdoom.org/viewtopic.php?f=3&t=13253
and a user states that reading include files from MinGW will create issues. If that is the case, how do I then switch VS 2017 from using the MSVC(?) files instead of MinGW? Is there something i can add with a cmake command that will force it to change?
I submitted an issue in the original repo and the plugin's author has helped me resolve the issue, here are the steps i took:
re-installed VS 2012 with Update 4 (https://my.visualstudio.com/Downloads?q=visual%20studio%202012)
re-generated a solution/project for this plugin via the docs
removed C:\MinGW from the "Additional Includes Directories" from the mmSolver project in Visual Studio
replaced COMMAND rcc -binary resources.qrc -o resources.rcc in icons\CMakeLists.txt to COMMAND C:/Python27/Lib/site-packages/PyQt4/pyrcc4.exe -o resources.rcc resources.qrc (I had to do something similar for the sphinx-build anyways)
After doing all of that I re-compiled the solution, and it seemed to work? although there were a lot of warnings, hoping that these are expected.../
https://pastebin.com/bpf1U4vD
And I saw that a .mod file and a directory identically named to your latest release were generated, but just copying those didn't really do anything, so what I ended up doing was taking the release zip file and extracting that, but replaced the .mll plugin file with what was generated on my end. I also noticed that if I left the .mod file the way it was my version of Maya still did not load anything, so as a guess I changed the + PLATFORM:win64 MAYAVERSION:2016 mayaMatchMoveSolver 0.3.6 line in the mod file to + PLATFORM:win64 MAYAVERSION:2016.5 mayaMatchMoveSolver 0.3.6 and that made everything load up fine.
For more info refer to the issue I have submitted here: https://github.com/david-cattermole/mayaMatchMoveSolver/issues/148
I am facing this error message:
error C1001: An internal error has occurred in the compiler
It appears just in the Debug mode. There is no clue about why this is happening. The compiler does not give me any hint to the line. When I click on the error it is take me to blank file called xxx.obj.
The platform:
Visual Studio 2013
Intel i7
Windows 8
I figured the problem after digging into the warnings I am getting. There was a suspecios one which is:
warning C4239: nonstandard extension used : 'argument' :
conversion from 'T' to 'T&'
This warning is because of this line:
auto x = foo(bar{});
the function foo is declared as follow:
int foo(bar&);
This behavouir is not standared as was discuueed here: Is it possible to know if the parameter was defaulted . However, MSVS supports this behaviour as non-standard extension.
Usually it works well without any problem but due to non-known thing in this project it did not work.
After correcting it with these two lines:
bar temp{};
auto x = foo(temp);
Everything worked well.
So I have two problems. The first is that there is some code that has a lot of using statements for things in the Windows namespace like this:
using namespace Windows::System;
using namespace Windows::Storage;
using namespace Windows::ApplicationModel;
For some reason this is causing a ton of compiler errors like this:
error C2039: 'System' : is not a member of 'Windows'
error C2871: 'System' : a namespace with this name does not exist
error C2039: 'Storage' : is not a member of 'Windows'
error C2871: 'Storage' : a namespace with this name does not exist
error C2039: 'ApplicationModel' : is not a member of 'Windows'
error C2871: 'ApplicationModel' : a namespace with this name does not exist
error C3083: 'ApplicationModel': the symbol to the left of a '::' must be a type
I found a fix for this problem by setting the "Windows Store App Support" property of the project to true. This is really strange that I need to do this since it's not a windows store application, but it's the only thing I've found to fix the compiler errors.
The second problem is that when I restart visual studio it fails to load the project with the error message: "Project is incompatible with the current edition of Visual Studio". I'm not sure if this is a bug in Visual Studio 2012 or what, but it seems very odd to me that it lets you set this option if it's going to make the project incompatible the next time you open it.
If there's an alternative solution to fixing the compiler errors that doesn't involve turning on the store app property then that would be the preferred solution, but I'm up for anything at this point.
Figured it out. This website has all the information needed on what paths you need to add in order to get it to find the windows.winmd file, which is what spawned all of my original issues. Once I followed their steps it fixed all my issues.
I have just added the QT dll to a new C++ project in Visual Studio 2010, no code added. But when I build the project I have error message:
Error 62 error C2373: '_InterlockedCompareExchange' : redefinition; different type modifiers C:\Users\bap\Desktop\cPlus\LIBRARY\QtCore\qatomic_msvc.h 128 // Code Clarity
Please tell me how to fix that.
I had the same problem. I solved it by trying different different calling conversions in your project.(e.g. from stdcall to cdecl)
According to MSDN, Visual C++ 2003 and Visual C++ 6 could emit warning C4247
'member' not accessible because 'class1' uses 'access' to inherit from 'class2'
and warning C4248
'class1' : cannot access 'access' 'member' declared in class 'class2'
There's no information on these warnings and they are no longer emitted in newer versions (2005 and above).
What did they mean and why were they removed?
These were replaced by errors:
C2247: 'identifier' not accessible because 'class' uses 'specifier' to inherit from 'class'
C2248: 'member' : cannot access 'access' member declared in class 'class'
Note that aside from the first digit, the error numbers are the same as the old warning numbers. For the most part, C++ errors start with '2', Managed C++ and C++/CLI errors start with '3', and warnings start with '4'.