Skip to content

TagValues::EMPTY_TABLE_STRUCT and TagValues::EMPTY_TABLE_MARKER : are they correctly located? #33

@hadjiprocopis

Description

@hadjiprocopis

Hi,
I am trying to port basic functionality of libgeodesk to Perl, which is a zigzag process :)
At some stage it kept complaining that TagValues::EMPTY_TABLE_STRUCT was undefined symbol, although I could see it as a constant in the symbol table of the linked library libgeodesk.so/a.

What solved my problem was these 2 edits:

  1. In file src/feature/TagTablePtr.cpp around line 18, comment as per the following:
/**
 * A construct that simulates a pointer to an empty tag-table.
 * The first word is a relative pointer to the second word (4),
 * the second word is the empty-table marker itself.
 */
//const uint32_t TagValues::EMPTY_TABLE_STRUCT[2] = { 4, TagValues::EMPTY_TABLE_MARKER };
//const double TagValues::SCALE_FACTORS[] = { 1.0, 0.1, 0.01, 0.001 };
  1. In file include/geodesk/feature/TagValues.h around line 33, replace static const uint32_t EMPTY_TABLE_STRUCT[2]; with static constexpr uint32_t EMPTY_TABLE_STRUCT[2] = { 4, TagValues::EMPTY_TABLE_MARKER }; and replace static const double SCALE_FACTORS[]; with static constexpr double SCALE_FACTORS[] = { 1.0, 0.1, 0.01, 0.001 };.

With the above changes I run the tests (after changing all the different gol files to a single one I have installed in my system) and they seem to be OK (4 fail because gol's contents are not what expected, obviously).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions