Skip to content
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

Could You Please Enhance demo5's Flexibility by Adding CMakeLists.txt? #562

Open
liusheng2020 opened this issue Jan 10, 2025 · 5 comments
Open

Comments

@liusheng2020
Copy link

Thank you for your wonderful work! I have successfully set up debugging for rtklib-demo5 in VS2022 by opening the rtklib-demo5/app/consapp/XXX/msc/msc.sln file.

However, I am unsure how to debug it using the existing makefile. Additionally, I noticed that the current rtklib-demo5/app/consapp/XXX/gcc/makefile is designed for Ubuntu (Linux) and is not directly applicable to Windows.

CMake can lower the learning curve and simplify the compilation and usage of RTKLIB (demo5), especially for beginners. Could you please add a CMakeLists.txt file so that we can more easily debug consapp on both Ubuntu (Linux) and Windows? With CMakeLists.txt, it would be possible to automatically generate the appropriate makefile for different platforms, increasing the flexibility of the project.

I previously forked a CMake version of demo5 that works well (I have successfully tested it on Ubuntu using VSCode), but the author is no longer actively maintaining it, and more importantly, its folder structure is not synchronized with the latest demo5, so it cannot be directly used in this repository. Here is the project link for your reference: https://github.com/liusheng2020/demo5-cmake

Thank you!

@JensReimann
Copy link
Collaborator

Please have a look at the latest commit "Initial support for CMake". It is optional, only preliminary and not yet tested with Visual Studio (but the Visual C compiler).
Feedback is welcome.

@shegnauer
Copy link

See my comment on that latest commit. It breaks compilation with Embarcadero 11 + 12.

@JensReimann
Copy link
Collaborator

The problem is, that CMake wil generate new makefiles which overwrite the manually created once.
This is a general problem and hard to solve.

@rtklibexplorer
Copy link
Owner

I've reverted this commit until the issues with breaking the Embarcadero builds is resolved.

@liusheng2020
Copy link
Author

With the commit titled "Initial support for CMake," I am now able to successfully compile this project, including both the CUI (Command-Line Interface) and the QT GUI (Graphical User Interface), on both Linux and Windows platforms. However, I am encountering difficulties when trying to integrate Embarcadero into the CMakeLists.txt, even though the project compiles successfully using Embarcadero C++ Builder 12 directly.

Despite setting the following configurations in the CMakeLists.txt:

set(CMAKE_C_COMPILER "D:/Program Files (x86)/Embarcadero/Studio/23.0/bin/bcc32c.exe")
set(CMAKE_CXX_COMPILER "D:/Program Files (x86)/Embarcadero/Studio/23.0/bin/bcc32.exe")
set(CMAKE_CXX_COMPILER_ID  "Embarcadero")

the build process still fails. Here is the error message I encountered:
Image

I have found a potentially useful resource that might help address this issue:
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_CMake_with_C%2B%2B_Builder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants