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

C++ object clashes in xCode #3156

Open
demiantres opened this issue Jan 19, 2025 · 2 comments
Open

C++ object clashes in xCode #3156

demiantres opened this issue Jan 19, 2025 · 2 comments

Comments

@demiantres
Copy link

demiantres commented Jan 19, 2025

When using the Qt backend in maplibre-native (not maplibre-native-qt!) in iOS (probably also macOS) then xCode compilation fails due to different classes using the same file names:

headless_backend.cpp
gl_functions.cpp
value.cpp
thread.cpp
number_format.cpp
interpolate.cpp
image.cpp
collator.cpp
source.cpp
light.cpp
layer.cpp
filter.cpp
sprite.cpp
file_source_manager.cpp
layer_manager.cpp
renderer_backend.cpp
attribute.cpp
scheduler.cpp

Renaming one of each of the clashing files to, e.g., "gl_functions_qt.cpp" or "image_def.cpp" fixes the problem.

@ntadej
Copy link
Collaborator

ntadej commented Jan 19, 2025

Do you include too many files? How do you actually build the code and what do you want to achieve?

@demiantres
Copy link
Author

demiantres commented Jan 19, 2025

The directory structure looks like this:
MainApp:
|- add_subdirectory(maplibre-native): CMakeLists.txt (-DMLN_WITH_QT=ON, -DMLN_QT_LIBRARY_ONLY=ON)

I load this into Qt Creator, target Qt 6.5 iOS. This generates a xCode workspace which I open with xCode and compile&run on the device. Some files are already renamed in the repository - maybe the ones I mentioned above have been forgotten.

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

2 participants