Visual Studio 2022 can't compile C++ device on Windows 10

Hello, everyone.
I'm trying to compile a C++ Tango device (made using Pogo) in Visual Studio 2022 but I ran into errors I don't know how to solve.

First of all, it couldn't find some inner tools or commands, so I switched Standart ISO C++14 to C++17 in all 4 Projects (Class_dll, Class_lib, Server_shared, Server_static) of the Solution.

Then it couldn't find some libraries or headers, if I remember correctly, so I added "$(TANGO_ROOT)\include;" to С/С++ -> General -> Auxilialy include folders in all 4 Projects.

And now I get: LNK1181 can't open input file "omniORB4.lib" in Project Server_static file LINK.
I added "$(TANGO_ROOT)\include;$(TANGO_ROOT)\include\omniORB4" to С/С++ -> General -> Auxilialy include folders, as well as to Linker -> General -> Auxilialy library folders, of the Server_static project, but it didn't help at all.
> First of all, it couldn't find some inner tools or commands, so I switched Standart ISO C++14 to C++17 in all 4 Projects (Class_dll, Class_lib, Server_shared, Server_static) of the Solution.

Yes that's required, the release notes at [1] mention that as well.

> Then it couldn't find some libraries or headers, if I remember correctly, so I added "$(TANGO_ROOT)\include;" to С/С++ ->
> General -> Auxilialy include folders in all 4 Projects.
>
> And now I get: LNK1181 can't open input file "omniORB4.lib" in Project Server_static file LINK.
> I added "$(TANGO_ROOT)\include;$(TANGO_ROOT)\include\omniORB4" to С/С++ -> General -> Auxilialy include folders, as well as
> to Linker -> General -> Auxilialy library folders, of the Server_static project, but it didn't help at all.

I don't use Visual Studio project files directly, so I can't help here. If you are open to a different approach, have a look at how we use cmake, see the readme [2] or how TangoTest does it [3].

With windows you also have to take care to use the correct MSVC runtime library version. If you used the Windows installer for installer tango, you are using tango as shared libraries, and this also implies that you have to use MSVC as DLL. This is the default with cmake.

[1]: https://gitlab.com/tango-controls/cppTango/-/blob/main/RELEASE_NOTES.md?ref_type=heads
[2]: https://gitlab.com/tango-controls/cppTango/-/blob/main/INSTALL.md?ref_type=heads#using-cmake-package-support-in-packages-requiring-tango
[3]: https://gitlab.com/tango-controls/TangoTest/-/blob/main/CMakeLists.txt?ref_type=heads
Hi,

I concur with t-b, and would like to add that the code generation for visual projects is not maintained any longer, the way to go is with cmake. But cmake files generated by pogo are not the best and I'm not sure if it was tested on windows, so you might not have better results…

On TangoTest for instance the CMakeLists.txt was not generated by pogo, and is much better. If using generated CMakeLists.txt does not work, you can try and adapt the one from TangoTest to fit your project.
 
Register or login to create to post a reply.