Closed Dumbledoom closed 2 years ago
There are some changes proposed which are not complete for ACE/TAO to better support qt5 through vcpkg, maybe related, see https://github.com/DOCGroup/ACE_TAO/pull/968 and https://github.com/microsoft/vcpkg/pull/8468
OpenDDS 3.13.x only builds with Qt4 OpenDDS master (soon to be 3.14) only builds with Qt5 We have used Qt5 via vcpkg on many VC++ development machines so we can help you get it set up.
@jwillemsen @mitza-oci thanks for getting back so quickly. This explains a lot, no wonder I was having issues with Qt5 then!
My latest build attempt with Qt4 did go better as I mentioned above, though I am still struggling to understand why I am having the issues I mentioned . I set --qt=C:\Qt\4.8.6\bin (also set in system path) and --qt-include=C:\Qt\4.8.6\include, I believe these are correct? With respect to the LNK1112 error, I don't think the build environment is targeting a x86 system. I have gone through these steps:
with still no luck. I forgot to say in the op that my machine is 64-bit.
Without actually running it, I think you want --qt=C:\Qt\4.8.6
without setting qt-include. That would mean that QTDIR
doesn't end in bin
. But it may work the same either way.
If you have a 64-bit build of Qt4 matched with a 64-bit build of OpenDDS, that will resolve LNK1112.
I have done as you said and set the QTDIR
, and excluded include, it seems to work as expected.
The Qt4 build I have installed I think is the issue then, I have tried installing the latest version from here: https://download.qt.io/archive/qt/4.8/4.8.7/ but still having the same issue.
There is not a 64-bit executable it would seem, would you recommend build Qt4 from source instead?
So I had a look into building Qt4, could not even get it to configure. I saw also that it takes 10 hours to build which I do not think is reasonable considering there are likely pre-built versions.
Another avenue I have just tried is building everything as 32 bit, though now there seems to be more environment variable issues, and LNK1112 showed again but with the system bit types swapped.
EDIT: I have managed to get around the LNK1112 error on the monitor app by building a win32 debug version of OpenDDS, which confirms that it is the Qt4 version being the problem. When I try to start the monitor I now have an error saying MSVCP100D.dll
is missing from my machine, I think that is related to building a debug version so I will try a release version next. Strangely the syntax errors I mentioned on ExcelRTD still caused that build to fail. Either way, it would be preferable to build a 64 bit version.
If you are using prebuilt binaries from https://download.qt.io/archive, you'll have to match the compiler version and the platform (Win32 vs. x64) as they specify. The compiler version determines which runtime library (msvcp*.dll
) it uses. You can also build Qt from source. None of this really has anything to do with OpenDDS.
I couldn't get the configuration script for Qt to work so I gave up on that and just built a 32 bit version, as the only installers Qt provides are 32 bit. It seems to work just fine, but I'll be investigating building 64 bit further at a later time.
I know this part hasn't been about OpenDDS, apologies, it stemmed from the op. More on the topic, however, is that the ExcelRTD plugin still failed to build correctly, quoting the errors I mentioned in the op. I can't see why these would be showing unless there is a problem with my include path files, as I cannot see any problems with the code on lines 13 and 20 in RTDServerDLL.cpp
.
Please paste the build output from ExcelRTD and attach the vcxproj file for it. Also please confirm that this is still with OpenDDS 3.13.3 with Visual Studio 2017.
Here is the vcxproj: ExcelRTD.zip
And the build output: ExcelRTD.log
I can confirm I am using those versions.
Something went wrong in the project generation, this project's vcxproj contains RTD_DLL_NAME=\"$(TargetFileName)\"
instead of
RTD_DLL_NAME="$(TargetFileName)"
You can edit it directly in Visual Studio so that it shows RTD_DLL_NAME="$(TargetFileName)"
in the UI. Or even RTD_DLL_NAME=OpenDDS_ExcelRTDd.dll
(for Debug).
I believe there may have been an issue with the visual studio command line I was using to run the configure script with; I have solved my Qt issues using the native x64 version of the cmd, beforehand I did not realize there was another cmd I could install. Running the configure script in the non 64 bit version produces the vcxproj file I linked above, however using the other one produces this:
I checked before compiling and found RTD_DLL_NAME="$(TargetFileName)"
, which on compile still resulted in the errors mentioned above. I will try editing it directly to RTD_DLL_NAME="$(TargetFileName)"
and RTD_DLL_NAME=OpenDDS_ExcelRTDd.dll
and report back.
I have been trying unsuccessfully to build with Qt5 for the last couple of days, following these instructions: https://github.com/objectcomputing/OpenDDS/blob/master/docs/qt.md. I am running:
Windows 7 SP1 OpenDDS 3.13.3 MSVS 2017 with SDK 10.0.16299.0
Whatever I do the build on iShapes, Monitor app and ExcelRTD fail, and specifically on iShapes it cannot locate the correct directories e.g. QtCore/QWidget. I have tried with Qt5 through vcpkg, as mentioned above in the instructions, Qt 5.12.6 and Qt 4.8.6 through direct install.
Qt5 through vcpkg The build that comes from running the vcpkg command mentioned in the above link does not have some of the include packages required in the files, and others are in different locations. When building iShapes this is the main issue. With ExcelRTD and Monitor I believe it is a similar problem. I set the --qt to be C:\vcpkg-master\installed\x64-windows, and C:\vcpkg-master\installed\x64-windows\include for --qt-include. I have also tried other plausible roots for these variables but still the same issue. I could still be messing up the environment variables here but there is definitely an in issue with include packages not being present in these directories.
Qt 5.12.6 Essentially I encountered the same problem as above, the build fails because include packages cannot be found.
Qt 4.8.6 This seemed to work better. I inspected the directories and could see that many of the missing include packages were there, however all projects still fail to build. iShapes and Monitor_App fail with this error:
This is probably fixable on my machine but so far I have not figured out the exact cause as I am certainly targeting x64.
ExcelRTD fails with 4 C++ syntax errors in the file RTDServerDLL.cpp :
I do not think these are errors in the code, I cannot see any problems with them, however I am at a loss as to why this is happening.
Other than these projects, the rest of OpenDDS builds fine and I have managed to run the tests. Any help on this would be hugely appreciated, I will say that I am new to OpenDDS and building software in this way, though I have had a couple of weeks having a go at it so have learnt a lot in that time.