OpenNebulosity
OpenNebulosity copied to clipboard
Windows: Cannot open source files Debug/progid:DriverHelper.tlh Debug/progid:QSICamera.tlh
Hi:
I'm trying to compile OpenNebulosity in Windows using Microsoft Visual Studio Community 2019 Version 16.11.5. However, I get these errors:
Severity Code Description Project File Line Suppression State
Error (active) E1696 cannot open source file "C:/Users/vrrui/source/repos/OpenNebulosity/nebulosity4/Debug/progid:DriverHelper.tlh" Nebulosity4 C:\Users\vrrui\source\repos\OpenNebulosity\nebulosity4\precomp.h 36
Error (active) E1696 cannot open source file "C:/Users/vrrui/source/repos/OpenNebulosity/nebulosity4/Debug/progid:QSICamera.tlh" Nebulosity4 C:\Users\vrrui\source\repos\OpenNebulosity\nebulosity4\precomp.h 43
Error (active) E0725 name must be a namespace name Nebulosity4 C:\Users\vrrui\source\repos\OpenNebulosity\nebulosity4\ASCOMCamera.h 60
Error C3500 invalid ProgID 'QSICamera.CCDCamera' Nebulosity4 C:\Users\vrrui\source\repos\OpenNebulosity\nebulosity4\precomp.h 43
Error C1103 fatal error importing progid: 'QSICamera.CCDCamera' Nebulosity4 C:\Users\vrrui\source\repos\OpenNebulosity\nebulosity4\precomp.h 43
I tried to add both QSICamera libs and ASCOM libraries to the paths, without luck:
-
Source Directories: $(SolutionDir)..\Win_Libraries\wxWidgets-3.0.2\include\msvc;$(SolutionDir)..\Win_Libraries\wxWidgets-3.0.2\include;$(SolutionDir)..\Win_Libraries\Visual Leak Detector\include;$(SolutionDir)..\Win_Libraries\xdispatch_0.7.2_Visual Studio 10_i386\include;$(IncludePath)
-
Library Directories: $(SolutionDir)..\Win_Libraries\Visual Leak Detector\lib\Win32;$(SolutionDir)..\Win_Libraries\wxWidgets-3.0.2\lib\vc_lib;$(SolutionDir)..\Win_Libraries\xdispatch_0.7.2_Visual Studio 10_i386\lib;C:\Program Files (x86)\ASCOM\Platform 6 Developer Components\Components\Platform55;$(SolutionDir)..\Win_Libraries\QSISDK_20200917\QSICamera\lib;$(LibraryPath)
Any tip?
It may be that you need to install the ASCOM developer tools and the QSI developer libraries separately.
So I have had this problem as well and I have solved half of it by modifying Precomp.h, however I have found that the QSI Com dll is not registering with anything not regasm or regsvr32, also I cannot for the life of my pull a tlb file out of the static library or the dynamic one. I think they, QSI, may be distributing a broken com library and do not know it.
Okay so I was able to solve these issues, for the fix to the com pointers you will have to look at my fork, but for the QSI issue you need to download there development drivers here.
Once you have downloaded and unzipped the SDK you will need to enter the following commands in powershell or cmd (as admin):
cp $(SDKDIR)\QSICamera\lib\x32\QSICamera.dll C:\Windows\System32
cd C:\Windows\System32
regsvr32 QSICamera.dll
This will register the QSICamera DCOM object.
The next part that is tricky is that VS2019 uses C++14 by default so none of the
#import "progid: {yourLibrary}.{yourClas}"
Functions will work any more, this was done because Microsoft was abusing the #import
command for COM operations.
You can see the modified imports in my fork if you would like an idea of what to change.
I had to change precom.h and ASCOMCamera.cpp to only import files.
Hope this helps.