-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't compile example in Visual Studio 2019 #50
Comments
Hello purpledan, Can I see what's in your |
Okay, I know what's wrong. You need to enable the The build fails because the CMake configuration files in Turbo Vision ( Note that Visual Studio allows opening CMake projects directly. Check this out: https://docs.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-160. So you can manage your project's compilation settings with CMake and also use Visual Studio to edit code and debug. I recommend you to do this instead of configuring everything in Visual Studio. If you are not familiar with CMake you may have to spend some effort in learning it, but I think it's worth it. Let's assume your project consists only of the cmake_minimum_required (VERSION 3.5) # This can be raised later if you run into issues.
# Use whatever project name you want
project(gaugevision)
# Define output executable and source files
add_executable(hello hello.cpp)
# Import project tvision
add_subdirectory(<path to tvision folder>)
# The 'hello' executable depends on tvision. This will automatically configure the compilation flags
# and include directories necessary for 'hello' to compile successfully.
target_link_libraries(hello PRIVATE tvision) Note that in the Once your Using CMake has several benefits, especially when it comes to portability. But if you still prefer to do everything in Visual Studio (or there is some use case that can only be accomplished with Visual Studio), then you need to add the required compilation flags manually. |
THAT WORKED PERFECTLY! Thank you so much! I will look into using cmake especially if it is going to help me with portability. I do not have a specific preference at the moment so I'd like to keep my options open. I love the name 'GaugeVision' I am so going to use that for my application. If I am successful with the project I will gladly share it with you even if it is just for a screenshot for the github page. I wonder if others would benefit from this information if they plan on using tvision with Visual studio. |
Haha. I'll look forward to it.
Yes, this is true. I can't expect everybody to use Turbo Vision as a CMake subproject. There have to be clear instructions to use it without CMake. |
Hello there,
I have managed to build the project using cmake and MSVC, I could open the examples and even make small changes. However, when I create a new project, copy the hello.cpp to my project, set the include path and the lib path it fails to compile giving me these errors:
1>Tvision3.cpp 1>C:\Users\%username%\source\tvision-master\include\tvision\tv.h(35,9): warning C4068: unknown pragma 'option' 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\limits(44,67): error C2864: 'std::_Num_base::has_denorm': a static data member with an in-class initializer must have non-volatile const integral type or be specified as 'inline' 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\limits(44,67): message : type is 'std::float_denorm_style' 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\limits(45,59): error C2864:
etc. etc.I would really like to use this library as I love CLI interfaces, I am currently working on a project for my university to create a unified interface for all our vacuum gauges. So far I have managed to do it well on Labview but I would like to build everything using Turbo Vision. Not only would it mean a great relief or resources compared to the bloat that is Labview, but CLI may also be used via SSL.
Any advice on how to overcome this issue would be greatly appreciated.
The text was updated successfully, but these errors were encountered: