Ticket #23 (closed defect: fixed)

Opened 9 months ago

Last modified 2 months ago

Undeclared PACKAGE_VERSION when building with Visual C++

Reported by: mloskot Owned by: hobu
Priority: critical Milestone: 1.0
Component: Base Library Version: svn-trunk
Keywords: msvc Cc:
LAS Format Version: Not Applicable

Description

libLAS compilation using VC++ gives following error:

las_c_api.cpp(1147) : error C2065: 'PACKAGE_VERSION' : undeclared identifier

Change History

Changed 7 months ago by hobu

Do you have any ideas for a good solution to this? I know the code does strdup right now, and at least compiles, but we should try to make it less hacky if we can.

Changed 7 months ago by mloskot

I'm pasting what we have discussed on #liblas:

[08:10]  <mloskot> hobu: the 23 is an issue for all non-autoconf stuff
[08:10]  <hobu> right
[08:10]  <mloskot> So, I think there is no other solution than to define it in a header
[08:10]  <mloskot> like GDAL, GEOS, etc.
[08:10]  <hobu> grr
[08:10]  <hobu> :)
[08:11]  <mloskot> as I've already fixed it that way in las_config.h
[08:11]  <mloskot> hobu: another option could be to use /DPACKAGE_VERSION="xxx"
[08:11]  <mloskot> in makefile.vc for NMAKE
[08:11]  <mloskot> but then VC++ projects have problems
[08:11]  <mloskot> IOW, it's a builder-specific solution
[08:12]  <mloskot> 1. What's the decision about 1.0 release we discussed above?
[08:12]  <mloskot> 2. What about the PACKAGE_VERSION ?
[08:13]  <hobu> re #23, the only hassle with what we're doing now is that at release time, there are a number of locations that need to be updated with the version number
[08:13]  <liblastrac> Ticket #23: Undeclared PACKAGE_VERSION when building with Visual C++, http://liblas.org/ticket/23
[08:13]  <hobu> I think I can put stuff in a HOWTORELEASE doc
[08:13]  <mloskot> apparently we need a HowToRelease wiki that lists all these places

So, are we happy with what we have in the las_config.h, line 93 ?

Changed 4 months ago by hobu

  • las_format set to Not Applicable
  • milestone set to 1.0

I changed to using GDAL's approach in r839 and r840.

Changed 2 months ago by hobu

  • status changed from new to closed
  • resolution set to fixed

Closing this ticket, as I think it is now fixed.

Note: See TracTickets for help on using tickets.