[pdal] Bug: Compile on Windows

Nicolas Mantelier nicolas.mantelier at spaceyes.fr
Mon May 27 08:39:55 PDT 2013


Additional question

 

I try to add PDAL in my project work on vs2003 ( it is not the moment to
move to another vs )

My question; there is an C api for Pdal like for Gdal ?

 

Other question I successful compiled PDAL with GDAL form OSGeo4W (build in
vs2008) with vs2010.

I Already have GDAL 1.9 (prerequi) build with vs2003 so I try to link with
this librairie.

 

Errors report

Erreur   16           error LNK2001: symbole externe non résolu
_CPLGetErrorHandlerUserData at 0
C:\PDAL\PDAL\build_vc100_withvc7\src\InPlaceReprojection.obj         pdal

Erreur   17           error LNK2001: symbole externe non résolu
_CPLGetErrorHandlerUserData at 0
C:\PDAL\PDAL\build_vc100_withvc7\src\Reprojection.obj        pdal

Erreur   18           error LNK2019: symbole externe non résolu
_CPLGetErrorHandlerUserData at 0 référencé dans la fonction "public: static
void __stdcall pdal::gdal::Debug::trampoline(enum CPLErr,int,char const *)"
(?trampoline at Debug@gdal at pdal@@SGXW4CPLErr@@HPBD at Z)
C:\PDAL\PDAL\build_vc100_withvc7\src\GDALUtils.obj              pdal

Erreur   19           error LNK2001: symbole externe non résolu
_CPLGetErrorHandlerUserData at 0
C:\PDAL\PDAL\build_vc100_withvc7\src\GlobalEnvironment.obj          pdal

Erreur   20           error LNK2001: symbole externe non résolu
_CPLGetErrorHandlerUserData at 0
C:\PDAL\PDAL\build_vc100_withvc7\src\StageFactory.obj        pdal

Erreur   21           error LNK2001: symbole externe non résolu
_CPLGetErrorHandlerUserData at 0
C:\PDAL\PDAL\build_vc100_withvc7\src\Colorization.obj          pdal

Erreur   22           error LNK1120: 1 externes non résolus
C:\PDAL\PDAL\build_vc100_withvc7\bin\pdal.dll           pdal

Erreur   23           error LNK2019: symbole externe non résolu
_CPLGetErrorHandlerUserData at 0 référencé dans la fonction "public: static
void __stdcall pdal::gdal::Debug::trampoline(enum CPLErr,int,char const *)"
(?trampoline at Debug@gdal at pdal@@SGXW4CPLErr@@HPBD at Z)
C:\PDAL\PDAL\build_vc100_withvc7\test\unit\ColorizationFilterTest.obj
pdal_test

Erreur   24           error LNK2001: symbole externe non résolu
_CPLGetErrorHandlerUserData at 0
C:\PDAL\PDAL\build_vc100_withvc7\test\unit\GDALUtilsTest.obj
pdal_test

Erreur   25           error LNK1120: 1 externes non résolus
C:\PDAL\PDAL\build_vc100_withvc7\bin\pdal_test.exe                pdal_test

 

 

Regards,

 

De : pdal-bounces at lists.osgeo.org [mailto:pdal-bounces at lists.osgeo.org] De
la part de Nicolas Mantelier
Envoyé : lundi 27 mai 2013 12:32
À : pdal at lists.osgeo.org
Objet : [pdal] Bug: Compile on Windows

 

Hello Evry body

I finaly build PDAL with vs 2010 i have some bug issue

 

First :

Project Pdal don’t configure with cmake with embedded boost 

Need to specify: set(Boost_FILESYSTEM_LIBRARY ) cause it was use before
initialization

 

Second:

set(PDAL_OUTPUT_LIB_DIR ${PDAL_BINARY_DIR}/${LIB_INSTALL_DIR})

set(PDAL_OUTPUT_BIN_DIR ${PDAL_BINARY_DIR}/${BIN_INSTALL_DIR})

Was use before initialization 

Need to specify:

set (PDAL_BINARY_DIR ${CMAKE_BINARY_DIR})

set (LIB_INSTALL_DIR "lib")

set (BIN_INSTALL_DIR "bin")

 

For better anderstanding: I modify PATH FOR LIB and BIN destination

if(WIN32)

  foreach(config ${CMAKE_CONFIGURATION_TYPES})

    string(TOUPPER ${config} CONFIG)

    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG} "${PDAL_OUTPUT_LIB_DIR}")

    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG} "${PDAL_OUTPUT_BIN_DIR}")

    # ---[ Windows requires DLLs (shared libraries) to be installed in the
same directory as executables

    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG} "${PDAL_OUTPUT_LIB_DIR}")

 endforeach(config)

And same with link

if (WIN32)

    set(Boost_LIBRARIES "${PDALBOOST_LIB_NAME}.lib")

                foreach(config ${CMAKE_CONFIGURATION_TYPES})

                               string(TOUPPER ${config} CONFIG)

 
link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG}})

                endforeach(config)

 

Last:

With Option 

LIBxml2,GDAL,GTIFF,ICONV,LASZIP

There is error in XMLSchema.cpp with include

#include <unistd.h>

#include <strings.h>

#include <xlocale.h>

#include <sys/uio.h>

 

I fix it with but I don’t know if it is correct

#if _WIN32

#include <io.h>

#include <string.h>

#include <winsock2.h>

#else

#include <unistd.h>

#include <strings.h>

#endif

 

Regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20130527/276a3d17/attachment-0001.html>


More information about the pdal mailing list