Git Product home page Git Product logo

libkml's Introduction

Awesome logo

Build Status

This is Google's reference implementation of OGC KML 2.2. It also includes implementations of Google's gx: extensions used by Google Earth, as well as several utility libraries for working with other formats.

All of our documentation is on the project wiki: http://code.google.com/p/libkml/w/list

The wiki contains documents that describe:

  • An overview of the most recent release
  • Building and running the code
  • Running the unit tests
  • A general API reference guide
  • More details guides to each of the libkml modules

The main project page has links to the discussion group and the mailing list that mirrors the commit and issue logs.

Note on strings in libkml: As of r680, we changed all use of "std::string" to just "string". This change was motivated by a desire to permit use in codebases that provide their own string class. This change was transparent to you because of this change to src/kml/base/util.h:

#ifndef HAS_GLOBAL_STRING
using std::string;
#endif

All string-using code in libkml was modified to pull in that header.

[The above is the old README from libkml.googlecode.com. The wiki pages will be migrated across to github soon(-ish).]

libkml's People

Contributors

mashbridge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libkml's Issues

Conan package

Hello,
Do you know about Conan?
Conan is modern dependency manager for C++. And will be great if your library will be available via package manager for other developers.

Here you can find example, how you can create package for the library.

If you have any questions, just ask :-)

Mingw32 build failed

I am trying to compile using mingw32 (msys) with the following compiler:
COLLECT_GCC=C:\MinGW\bin\g++.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-4.9.3/configure --build=x86_64-pc-linux-gnu --host=mingw32 --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libstdcxx-debug --with-tune=generic --enable-nls
Thread model: win32
gcc version 4.9.3 (GCC)

I get this error during make:
time_util.cc:43:35: error: use of C++11 long long integer constant [-Werror=long-long]
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
^
time_util.cc:58:18: note: in expansion of macro 'DELTA_EPOCH_IN_MICROSECS'
file_time64 -= DELTA_EPOCH_IN_MICROSECS;
^
cc1plus.exe: all warnings being treated as errors

I tried adding c++11 flags to make file:
CXXFLAGS = -g -O2 -std=c++11 but it gives the same error.

unresolved external symbol _libkml_unzAttach

Dear All,
I built libkml-master (from msvc/libkml.sln), then I tried to build the examples (from msvc\examples\examples.sln) but I get the error:

libkmlbase.lib(zip_file.obj) : error LNK2001: unresolved external symbol _libkml_unzAttach

In fact zip_file.cc calls libkml_unzAttach() twice but that function is not declared.

Regards,
Gianni

Several tests fail due to bool conversion in ASSERT_EQ with gcc 4.8/OSX 10.9

Following a build, make check fails on compilation of 2 separate test files, src/kml/engine/clone_test.cc and src/kml/engine/merge_test.cc in the ASSERT_EQ(bool, other_bool) macro with an error of the form:

merge_test.cc:149:3: note: in expansion of macro 'ASSERT_EQ' ASSERT_EQ(kOpen, target_placemark_->get_open());
[...]
merge_test.cc: [...] error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]

See below for full error trace.

System info

uname -a:

Darwin chompy.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 i386 MacBookPro8,2 Darwin

g++ --version:

g++ (MacPorts gcc48 4.8.2_0+universal) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Details

It seems like this might be a problem with googletest harness itself, there's an identical issue in the Chromium tracker #150812 which proposes a new ASSERT_BOOL_EQ to sidestep the conversion process. I also found a Chromium commit entry which worked around the problem by using ASSERT_TRUE(expected == tested) rather than ASSERT_EQ.

g++ -DHAVE_CONFIG_H -I. -I../../..  -I../../../src -I../../../third_party/boost_1_34_1 -I../../../third_party/gtest-1.7.0/include  -Wall -Wextra -Wno-unused-parameter -Werror -fno-rtti -DGTEST_HAS_RTTI=0 -g -O2 -MT merge_test-merge_test.o -MD -MP -MF .deps/merge_test-merge_test.Tpo -c -o merge_test-merge_test.o `test -f 'merge_test.cc' || echo './'`merge_test.cc
In file included from ../../../third_party/gtest-1.7.0/include/gtest/gtest.h:1929:0,
                 from merge_test.cc:34:
merge_test.cc: In member function 'virtual void kmlengine::MergeTest_TestMergeFieldsMany_Test::TestBody()':
../../../third_party/gtest-1.7.0/include/gtest/internal/gtest-internal.h:133:55: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
     (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
                                                       ^
../../../third_party/gtest-1.7.0/include/gtest/gtest_pred_impl.h:77:52: note: in definition of macro 'GTEST_ASSERT_'
   if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                    ^
../../../third_party/gtest-1.7.0/include/gtest/gtest_pred_impl.h:166:3: note: in expansion of macro 'GTEST_PRED_FORMAT2_'
   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
   ^
../../../third_party/gtest-1.7.0/include/gtest/gtest.h:1993:3: note: in expansion of macro 'ASSERT_PRED_FORMAT2'
   ASSERT_PRED_FORMAT2(::testing::internal:: \
   ^
../../../third_party/gtest-1.7.0/include/gtest/gtest.h:1994:32: note: in expansion of macro 'GTEST_IS_NULL_LITERAL_'
                       EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
                                ^
../../../third_party/gtest-1.7.0/include/gtest/gtest.h:2011:32: note: in expansion of macro 'GTEST_ASSERT_EQ'
 # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
                                ^
merge_test.cc:147:3: note: in expansion of macro 'ASSERT_EQ'
   ASSERT_EQ(kVisibility, target_placemark_->get_visibility());
   ^
../../../third_party/gtest-1.7.0/include/gtest/internal/gtest-internal.h:133:55: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null]
     (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
                                                       ^
../../../third_party/gtest-1.7.0/include/gtest/gtest_pred_impl.h:77:52: note: in definition of macro 'GTEST_ASSERT_'
   if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                    ^
../../../third_party/gtest-1.7.0/include/gtest/gtest_pred_impl.h:166:3: note: in expansion of macro 'GTEST_PRED_FORMAT2_'
   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
   ^
../../../third_party/gtest-1.7.0/include/gtest/gtest.h:1993:3: note: in expansion of macro 'ASSERT_PRED_FORMAT2'
   ASSERT_PRED_FORMAT2(::testing::internal:: \
   ^
../../../third_party/gtest-1.7.0/include/gtest/gtest.h:1994:32: note: in expansion of macro 'GTEST_IS_NULL_LITERAL_'
                       EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
                                ^
../../../third_party/gtest-1.7.0/include/gtest/gtest.h:2011:32: note: in expansion of macro 'GTEST_ASSERT_EQ'
 # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
                                ^
merge_test.cc:149:3: note: in expansion of macro 'ASSERT_EQ'
   ASSERT_EQ(kOpen, target_placemark_->get_open());
   ^

Workaround/Solution

As referenced above, using ASSERT_TRUE(foo==bar) is a practical workaround that I have employed and all tests subsequently pass. I'm not sure if it's better or worse than applying the ASSERT_BOOL_* patch to gtest though.

ExternalProject Minizip not working

I'm trying to build libKML on Red Hat Enterprise Linux 7.3, there doesn't seem to be an rpm available for it.
Anyway, the build attempts to automatically download and build minizip 1.3.0 from http://sourceforge.net/projects/libkml-files/files/1.3.0/minizip.tar.gz/download, but it doesn't work for me.
I had to change Cmake to use wget instead of curl, so that might be why it doesn't work, but I think it's because the minizip.tar.gz file on the server is not actually gzipped. It's only tarred. So:
tar zxvf doesn't work.
tar xvf does.

So the extension is wrong.

build does not work for latest release

I downloaded your latest release.

ed@mikado:~/Downloads$ tar -zxf libkml-release-1.2.tar.gz 
ed@mikado:~/Downloads$ cd libkml-release-1.2/
ed@mikado:~/Downloads/libkml-release-1.2$ ./configure --prefix=/usr/local/klm-1.2
bash: ./configure: No such file or directory

So it seems that instead of doing a "make dist" and uploading to the github release page, you just let github build your releases. This is not a good idea.

Anyway, moving on from that, I tried to build your release from source with your autogen.sh script. But it fails as well:

ed@mikado:~/Downloads/libkml-release-1.2$ ls
AUTHORS  autogen.sh  ChangeLog  configure.ac  COPYING  DEPENDENCIES  doc  examples  INSTALL  iphone  libkml.sln  m4  Makefile.am  msvc  NEWS  README  src  testdata  third_party  xcode
ed@mikado:~/Downloads/libkml-release-1.2$ ./autogen.sh 
Platform is Linux
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
libtoolize: copying file 'config/ltmain.sh'
libtoolize: putting macros in 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
configure.ac:11: installing 'config/compile'
configure.ac:14: installing 'config/config.guess'
configure.ac:14: installing 'config/config.sub'
configure.ac:9: installing 'config/install-sh'
configure.ac:9: installing 'config/missing'
examples/engine/Makefile.am: installing 'config/depcomp'
automake: warnings are treated as errors
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libcurlfetch.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
examples/hellonet/Makefile.am:15:   while processing Libtool library 'libcurlfetch.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libhelloutil.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
examples/helloworld/Makefile.am:10:   while processing Libtool library 'libhelloutil.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmlbase.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/kml/base/Makefile.am:14:   while processing Libtool library 'libkmlbase.la'
parallel-tests: installing 'config/test-driver'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmlconvenience.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/kml/convenience/Makefile.am:15:   while processing Libtool library 'libkmlconvenience.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmldom.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/kml/dom/Makefile.am:10:   while processing Libtool library 'libkmldom.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmlengine.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/kml/engine/Makefile.am:10:   while processing Libtool library 'libkmlengine.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmlregionator.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/kml/regionator/Makefile.am:11:   while processing Libtool library 'libkmlregionator.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmlxsd.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/kml/xsd/Makefile.am:10:   while processing Libtool library 'libkmlxsd.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmlbase_swig_java.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/swig/Makefile.am:15:   while processing Libtool library 'libkmlbase_swig_java.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmlbase_swig_python.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/swig/Makefile.am:20:   while processing Libtool library 'libkmlbase_swig_python.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmldom_swig_java.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/swig/Makefile.am:15:   while processing Libtool library 'libkmldom_swig_java.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmldom_swig_python.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/swig/Makefile.am:20:   while processing Libtool library 'libkmldom_swig_python.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmlengine_swig_java.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/swig/Makefile.am:15:   while processing Libtool library 'libkmlengine_swig_java.la'
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libkmlengine_swig_python.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
src/swig/Makefile.am:20:   while processing Libtool library 'libkmlengine_swig_python.la'
third_party/Makefile.am:81: warning: source file '$(googletest)/src/gtest.cc' is in a subdirectory,
third_party/Makefile.am:81: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
third_party/Makefile.am:81: warning: source file '$(googletest)/src/gtest-death-test.cc' is in a subdirectory,
third_party/Makefile.am:81: but option 'subdir-objects' is disabled
third_party/Makefile.am:81: warning: source file '$(googletest)/src/gtest-filepath.cc' is in a subdirectory,
third_party/Makefile.am:81: but option 'subdir-objects' is disabled
third_party/Makefile.am:81: warning: source file '$(googletest)/src/gtest-port.cc' is in a subdirectory,
third_party/Makefile.am:81: but option 'subdir-objects' is disabled
third_party/Makefile.am:81: warning: source file '$(googletest)/src/gtest-test-part.cc' is in a subdirectory,
third_party/Makefile.am:81: but option 'subdir-objects' is disabled
third_party/Makefile.am:81: warning: source file '$(googletest)/src/gtest-typed-test.cc' is in a subdirectory,
third_party/Makefile.am:81: but option 'subdir-objects' is disabled
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libgtest.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
third_party/Makefile.am:9:   while processing Libtool library 'libgtest.la'
third_party/Makefile.am:11: warning: source file 'zlib-1.2.3/contrib/minizip/unzip.c' is in a subdirectory,
third_party/Makefile.am:11: but option 'subdir-objects' is disabled
third_party/Makefile.am:11: warning: source file 'zlib-1.2.3/contrib/minizip/ioapi.c' is in a subdirectory,
third_party/Makefile.am:11: but option 'subdir-objects' is disabled
third_party/Makefile.am:11: warning: source file 'zlib-1.2.3/contrib/minizip/iomem_simple.c' is in a subdirectory,
third_party/Makefile.am:11: but option 'subdir-objects' is disabled
third_party/Makefile.am:11: warning: source file 'zlib-1.2.3/contrib/minizip/zip.c' is in a subdirectory,
third_party/Makefile.am:11: but option 'subdir-objects' is disabled
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'libminizip.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
third_party/Makefile.am:8:   while processing Libtool library 'libminizip.la'
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriCommon.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriCompare.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriEscape.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriFile.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriIp4.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriIp4Base.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriNormalize.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriNormalizeBase.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriParse.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriParseBase.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriQuery.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriRecompose.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriResolve.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
third_party/Makefile.am:18: warning: source file '$(uriparser)/lib/UriShorten.c' is in a subdirectory,
third_party/Makefile.am:18: but option 'subdir-objects' is disabled
/usr/share/automake-1.15/am/ltlibrary.am: warning: 'liburiparser.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
third_party/Makefile.am:8:   while processing Libtool library 'liburiparser.la'
autoreconf: automake failed with exit status: 1

Do you have a working release anywhere? Thanks!

KmzFile's ReadKML() always returns an empty string

KmzFile* kmzFile = KmzFile::OpenFromString(someString); // some string checked to make sure is kmz
std::string kmlString;
kmzFile->ReadKml(&kmlString); // after execution, kmlString is always empty ("") and false returned.

Again, I have checked to make sure "someString" really is kmz data, and that there IS a doc.kml file inside the kmz. Why is the ReadKml function STILL returning false and putting an empty string as output?

Missing support for _MSC_VER 1900

Project upgrades require a few changes:

  • Update project intermediate directories to avoid warning about overlapping intermediate directories.
    • Pretty easy and I've already got this going.
  • Update boost to 1.61.0
    • Also pretty easy and upgrading was as easy as adding the new version and updating the include directories. Currently I dropped all of boost in so I'll have to reduce to the necessities at some point.
  • Security warnings about getenv
    • This is my current hurdle. I could just disable these, but that's weak sauce. Would use of _dupenv_s/free be ok? Or an attempt with a 1k stack buffer then fallback to _dupenv_s/free?

Things are building for me currently in Visual Studio 2015 Update 3, but I'd like to get the final warnings squared away and reduce boost before doing a PR.

undefined reference to `kmlbase::intrusive_ptr_release(kmlbase::Referent*)'

Hello, I'm trying to use libKML and I can successfully use " #include "kml/dom.h" " and "using namespace kmldom;". But if I try to use any function or type from libKML, I'm getting an error:

[main] Building folder: l3_kml 
[build] Starting build
[proc] Executing command: /usr/local/bin/cmake --build /home/ftn21/Documents/MAI/7sem/asbis/LB/realiziation/lb/l3_kml/build --config Debug --target all -j 6 --
[build] [1/1 100% :: 0.110] Linking CXX executable kml
[build] FAILED: kml 
[build] : && /usr/bin/clang++-9 -g  CMakeFiles/kml.dir/main.cpp.o -o kml   && :
[build] CMakeFiles/kml.dir/main.cpp.o: In function `~intrusive_ptr':
[build] /usr/include/boost/smart_ptr/intrusive_ptr.hpp:98: undefined reference to `kmlbase::intrusive_ptr_release(kmlbase::Referent*)'
[build] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[build] ninja: build stopped: subcommand failed.
[build] Build finished with exit code 1

Here is my CMakeLists.txt file:

cmake_minimum_required (VERSION 3.2)
# Set language standard
set(CMAKE_CXX_STANDARD "11")
project (kml)

# Set default build type to RelWithDebInfo if not specified
if (NOT CMAKE_BUILD_TYPE)
    message (STATUS "Default CMAKE_BUILD_TYPE not set using Release with Debug Info")
    set (CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE
        STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel"
        FORCE)
endif()

# linking kml library
find_package(LibKML)
if(NOT LibKML_FOUND)
	message(SEND_ERROR "Failed to find LibKML.")
	return()
else()
	include_directories(${LibKML_INCLUDE_DIRS})
endif()

add_executable (kml main.cpp)

target_include_directories(kml PUBLIC ${LibKML_INCLUDE_DIRS}) 
target_link_libraries(kml ${LibKML_LIBRARIES})

Here is the executable file main.cpp:

#include <iostream>
#include <string>
#include "kml/dom.h"

using namespace std;
using namespace kmldom;

int main() {
  cout << "hello world" << endl;

  ElementPtr element;  // error here

  return 0;
}

I use linux ubuntu 18.04.6 LTS, CMake 3.22.0, Clang 9.0.0

Security Policy violation Binary Artifacts

This issue was automatically created by Allstar.

Security Policy Violation
Project is out of compliance with Binary Artifacts policy: binaries present in source code

Rule Description
Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.

Remediation Steps
To remediate, remove the generated executable artifacts from the repository.

First 10 Artifacts Found

  • third_party/expat.win32/libexpat.dll
  • third_party/expat.win32/libexpat.lib
  • third_party/expat.win32/libexpatMT.lib
  • third_party/expat.win32/libexpatw.dll
  • third_party/expat.win32/libexpatw.lib
  • third_party/expat.win32/libexpatwMT.lib
  • third_party/uriparser-0.7.5.win32/debug/uriparser.lib
  • third_party/uriparser-0.7.5.win32/release/uriparser.lib
  • third_party/zlib-1.2.3.win32/bin/minizip.dll
  • third_party/zlib-1.2.3.win32/bin/zlib1.dll
  • Run a Scorecards scan to see full list.

Additional Information
This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.


Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar

This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Get fields from complex elements

Hello,
I am doing some stuff with the library and this question has come into my mind. I´ve tried to get those fields using the GetChildElements method, but with that, I just take the complex elements. I´ve searched into wiki and into the examples, but always it´s needed to know and cast the element to get the specific fields.

Project status

Hi,

Is this project still active here in github or in code.google.com?. I cannot find any packages for linux distribution or any release recently. The compilation itself is a mess which cant be avoided. Also the use of thridparty (boost, libz etcc.) in the source repository is again a place of 'hmmmm'. libz, boost could be an external and keeping a custom version could be removed.

libkml latest version is 1.3.0 but no official release of 1.3.0 or anything out there. Am I missing some read anywhere or this is what it is actually?
Anyway just checking if google has plan to continue this as is and say "open source" or just maintaining for legacy reasons.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.