eth4io / libkml

Automatically exported from code.google.com/p/libkml
Other
0 stars 0 forks source link

build/compile createkml.cc via command line #117

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Build the libkml library with: "./configure, make and sudo make install"
on the following platform:

hostname = stefan-laptop
uname -m = x86_64
uname -r = 2.6.28-15-generic
uname -s = Linux
uname -v = #49-Ubuntu SMP Tue Aug 18 19:25:34 UTC 2009
.(A statement from the config.log file.)

2. Running "make check" to verify the successful installation of libkml.
Excerpts of the test output looks as follows:

PASS: xsd_util_test
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from XstParserTest
[ RUN      ] XstParserTest.TestParseXstAlias
[       OK ] XstParserTest.TestParseXstAlias
[ RUN      ] XstParserTest.TestParseXst
[       OK ] XstParserTest.TestParseXst
[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran.
[  PASSED  ] 2 tests.
PASS: xst_parser_test
==================
All 9 tests passed
==================

3. Try to build the createkml.cc via command line with the following order:
"g++ -c -O2 -oCreatePlacemark.o CreatePlacemark.cpp".( That the file name
is different does not matter! It is a user specific change. ) Than, type
"make" into the command line in order to get an execution file.

What is the expected output? What do you see instead?

I expect an excecution file to run the little example. But I get error
outputs over uncountable pages. Excerpts follows here:

In file included from /usr/local/include/kml/dom/kmldom.h:55,
                 from /usr/local/include/kml/dom/kml_cast.h:30,
                 from /usr/local/include/kml/dom.h:32,
                 from CreatePlacemark.cpp:32:
/usr/local/include/kml/dom/stylemap.h: At global scope:
/usr/local/include/kml/dom/stylemap.h:84: Fehler: expected »;« before »&« 
token
/usr/local/include/kml/dom/stylemap.h:85: Fehler: expected `;' before »bool«

...

In file included from /usr/local/include/kml/dom.h:33,
                 from CreatePlacemark.cpp:32:
/usr/local/include/kml/dom/kml_factory.h:41: Fehler: »ElementPtr«
bezeichnet keinen Typ
In file included from /usr/local/include/kml/dom.h:34,
                 from CreatePlacemark.cpp:32:
/usr/local/include/kml/dom/kml_funcs.h:41: Fehler: »ElementPtr« bezeichnet
keinen Typ
/usr/local/include/kml/dom/kml_funcs.h:44: Fehler: »ElementPtr« bezeichnet
keinen Typ
/usr/local/include/kml/dom/kml_funcs.h:51: Fehler: »ElementPtr« bezeichnet
keinen Typ
/usr/local/include/kml/dom/kml_funcs.h:54: Fehler: »ElementPtr« bezeichnet
keinen Typ
/usr/local/include/kml/dom/kml_funcs.h:59: Fehler: expected »,« or »...«
before »&« token
/usr/local/include/kml/dom/kml_funcs.h:64: Fehler: expected »,« or »...«
before »&« token
In file included from /usr/local/include/kml/dom.h:38,
                 from CreatePlacemark.cpp:32:
/usr/local/include/kml/dom/parser_observer.h:47: Fehler: expected »,« or
»...« before »&« token
/usr/local/include/kml/dom/parser_observer.h:54: Fehler: expected »,« or
»...« before »&« token
/usr/local/include/kml/dom/parser_observer.h:59: Fehler: expected »,« or
»...« before »&« token
In file included from /usr/local/include/kml/dom.h:39,
                 from CreatePlacemark.cpp:32:
/usr/local/include/kml/dom/parser.h:61: Fehler: »ElementPtr« bezeichnet
keinen Typ
/usr/local/include/kml/dom/parser.h:64: Fehler: »ElementPtr« bezeichnet
keinen Typ
/usr/local/include/kml/dom/parser.h:68: Fehler: »ElementPtr« bezeichnet
keinen Typ
CreatePlacemark.cpp:35: Fehler: »kmldom::CoordinatesPtr« wurde nicht 
deklariert
CreatePlacemark.cpp:36: Fehler: »kmldom::KmlPtr« wurde nicht deklariert
CreatePlacemark.cpp:38: Fehler: »kmldom::PlacemarkPtr« wurde nicht deklariert
CreatePlacemark.cpp:39: Fehler: »kmldom::PointPtr« wurde nicht deklariert
CreatePlacemark.cpp: In function »int main()«:
CreatePlacemark.cpp:46: Fehler: »CoordinatesPtr« wurde in diesem
Gültigkeitsbereich nicht definiert
CreatePlacemark.cpp:46: Fehler: expected `;' before »coordinates«
CreatePlacemark.cpp:48: Fehler: »coordinates« wurde in diesem
Gültigkeitsbereich nicht definiert
CreatePlacemark.cpp:51: Fehler: »PointPtr« wurde in diesem
Gültigkeitsbereich nicht definiert
CreatePlacemark.cpp:51: Fehler: expected `;' before »point«
CreatePlacemark.cpp:52: Fehler: »point« wurde in diesem Gültigkeitsbereich
nicht definiert
CreatePlacemark.cpp:55: Fehler: »PlacemarkPtr« wurde in diesem
Gültigkeitsbereich nicht definiert
CreatePlacemark.cpp:55: Fehler: expected `;' before »placemark«
CreatePlacemark.cpp:56: Fehler: »placemark« wurde in diesem
Gültigkeitsbereich nicht definiert
CreatePlacemark.cpp:60: Fehler: »KmlPtr« wurde in diesem Gültigkeitsbereich
nicht definiert
CreatePlacemark.cpp:60: Fehler: expected `;' before »kml«
CreatePlacemark.cpp:61: Fehler: »kml« wurde in diesem Gültigkeitsbereich
nicht definiert
make: *** [CreatePlacemark.o] Fehler 1
.

I was searching through the existing issues without finding any helpful
informations. I hope the written decribtion is enouch to understand my
problem. I appologize for my novice english expression and spelling.

With regards,
Stefan Begerad

Original issue reported on code.google.com by begerad-...@online.de on 26 Aug 2009 at 11:58

GoogleCodeExporter commented 8 years ago

a normal full build automatically builds all examples:

: cd svn/libkml/trunk
: mkdir build
: cd build
: ../configure
: make
: ./examples/helloworld/createkml 
<kml>
  <Placemark>
    <name>Cool Statue</name>
    <Point>
      <coordinates>
        -122.0816695,37.42052549,0
      </coordinates>
    </Point>
  </Placemark>
</kml>
: 

Original comment by kml.b...@gmail.com on 4 Sep 2009 at 5:03

GoogleCodeExporter commented 8 years ago
It was my fault. The boost library was missing, but unobvious. The requirements 
does
not say boost is necessary, in my opinion. Although, I may be wrong. 
It does not matter longer. Remember, without the boost library libkml willnot 
comile
correctly.

greets,
Stefan

Original comment by begerad-...@online.de on 4 Sep 2009 at 6:49

GoogleCodeExporter commented 8 years ago
The (very small) part of boost required is shipped with libkml and used
automatically by the build system:

http://code.google.com/p/libkml/source/browse/#svn/trunk/third_party/boost_1_34_
1/boost

We don't list it in DEPENDENCIES as it's basically an internal implementation 
detail,
however we have carefully coded things such that we could offer a configure 
option
to use the boost library of your choice.

Original comment by kml.b...@gmail.com on 10 Sep 2009 at 1:32

GoogleCodeExporter commented 8 years ago
That sounds interessting. 
I described only the required configuration effort in order to use libkml on my
system(ubuntu 2.6.28-15-generic). I do not realy know why, but a successful
installation("sudo make install") of libkml on my system occured after the
installation of the boost library. Of course, it could be a system specific 
matter
and solved by using configure option during the installation of libkml. I have 
not
discovered the problem furthermore.

Original comment by begerad-...@online.de on 10 Sep 2009 at 7:22