Comments (5)
Looks like there is an error somewhere in what you did but from your vague description ("latest version of libosmium and protozero", "set up everything properly", "manually edited the protozero include path") we can't figure out what that is. Show us all the commands you used and their output. Maybe we can figure it out then.
from libosmium.
I cloned the latest version of libosmium and protozero from GitHub, and they are saved in the same directory. Then in the libosmium directory, I created the build
directory and ran cmake ..
and make
within, and here is the output result from ccmake ..
under the build
directory:
BUILD_BENCHMARKS OFF
BUILD_DATA_TESTS OFF
BUILD_EXAMPLES ON
BUILD_HEADERS OFF
BUILD_TESTING ON
BUILD_WITH_CCACHE OFF
CLANG_TIDY CLANG_TIDY-NOTFOUND
CMAKE_BUILD_TYPE RelWithDebInfo
CMAKE_CONFIGURATION_TYPES Debug;Release;RelWithDebInfo;MinSizeRel;Dev;Coverage
CMAKE_CXX_FLAGS_COVERAGE -g -O0 -fno-inline-functions -fno-inline --coverage
CMAKE_EXECUTABLE_FORMAT MACHO
CMAKE_EXE_LINKER_FLAGS_COVERAG --coverage
CMAKE_INSTALL_PREFIX /usr/local
CMAKE_OSX_ARCHITECTURES
CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
CPPCHECK CPPCHECK-NOTFOUND
EXAMPLES amenity_list;area_test;change_tags;convert;count;create_pois;debug;dump_internal;filter_discussions;index_lookup;l
GDAL_CONFIG GDAL_CONFIG-NOTFOUND
GDAL_INCLUDE_DIR GDAL_INCLUDE_DIR-NOTFOUND
GDAL_LIBRARY GDAL_LIBRARY-NOTFOUND
GEOS_INCLUDE_DIR GEOS_INCLUDE_DIR-NOTFOUND
GEOS_LIBRARY GEOS_LIBRARY-NOTFOUND
INSTALL_GDALCPP OFF
MEMORYCHECK_COMMAND MEMORYCHECK_COMMAND-NOTFOUND
OSMIUM_SKIPPED_TESTS geom/test_crs
OSMIUM_WARNING_OPTIONS -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloa
PROJ_INCLUDE_DIR PROJ_INCLUDE_DIR-NOTFOUND
PROJ_LIBRARY PROJ_LIBRARY-NOTFOUND
PROTOZERO_INCLUDE_DIR /Users/selinawan/work/protozero/include
WITH_PROFILING OFF
WITH_PROJ ON
After that, I compiled the script under examples (g++ examples/osmium_read.cpp -std=c++11
) and got the file not found error; however, I did clone protozero and the PROTOZERO_INCLUDE_DIR is correct.
That's pretty much all the steps I took just to try running osmium_read.cpp under the examples directory. Here is the version of GCC and Clang that I have:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I'm not sure where I messed up, and I hope that's enough information.
from libosmium.
You can't just compile a program using g++ examples/osmium_read.cpp -std=c++11
, because that way it will not use the configuration you created with cmake. Simply call make
in your build directory to compily everything. Or, if you only want to compile one part of the whole thing, use that as parameter to make: make osmium_read
in this case.
from libosmium.
Ok I see. That works for me now, thanks!
Now, I still have the same file not found problem when I try to create my own project using osmium. I simply just inserted #include <osmium/io/any_input.hpp>
in one of my .hpp files just to make sure everything is set up properly. I downloaded FindOsmium.cmake
and FindProtozero.cmake
and saved them to the project cmake directory
. Here is my ccmake output:
CMAKE_BUILD_TYPE
CMAKE_EXECUTABLE_FORMAT MACHO
CMAKE_INSTALL_PREFIX /usr/local
CMAKE_OSX_ARCHITECTURES
CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT /Library/Developer/CommandLineTools/SDKs/MacOSX
OSMIUM_INCLUDE_DIR /Users/selinawan/work/libosmium/include
OSMIUM_WARNING_OPTIONS -Wall -Wextra -pedantic -Wredundant-decls -Wdis
PROTOZERO_INCLUDE_DIR /Users/selinawan/work/protozero/include
When I compiled with make
, I still got the file not found error:
/Users/selinawan/work/libosmium/include/osmium/io/detail/o5m_input_format.hpp:56:10: fatal error:
'protozero/exception.hpp' file not found
#include <protozero/exception.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
from libosmium.
Sorry, this isn't a C++ help line, but a bug tracker for Osmium. Help on how to set up your own CMake configuration is waay beyond what we can provide here.
from libosmium.
Related Issues (20)
- Anychance to have a C interface ? HOT 1
- ctest failing on newly compiled code HOT 1
- Please reconsider the fadvise() usage HOT 3
- Increase maximimum integers in opl_parser_functions.hpp HOT 4
- Lots of warnings after #5d50405 in VS2019 HOT 5
- Unable to compile with c++20 when using precompiled binaries HOT 8
- Incorrect proj usage HOT 1
- libosmium no longer successfully builds after `v2.17.1` on CentOS 7 HOT 2
- Need help, how to add altitude to libosmium HOT 2
- Missing prepare_for_lookup in test_members_database.cpp HOT 1
- heads-up: PROJ_LIB is now deprecated (use PROJ_DATA instead)
- io_test_bzip2 fails on Alpine Linux HOT 3
- AppVeyor builds fail due to missing LZ4 HOT 5
- Print offending string in PBF-Decoder
- installation make error HOT 2
- Does libosmium work with MacOS (M series chip)
- Performance Issues with `timegm` called from `parse_timestamp` on iOS 16.2 HOT 10
- Fractional seconds in XML timestamps HOT 2
- compiler error HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libosmium.