[pgrouting-dev] OSX build error

Stephen Woodbridge woodbri at swoodbridge.com
Tue May 28 14:17:16 PDT 2013


On 5/28/2013 4:38 PM, Alec Gosse wrote:
> Sorry, that did not fix the issue:
> /usr/local/src/pgrouting_main/src/kdijkstra/src/k_targets_boost_wrapper.cpp:341:31: error: variable length array of non-POD element type
>        'std::vector<int>'
>      std::vector<int> path_vect[nb_targets];
>                                ^

What happens if you change this from:

std::vector<int> path_vect[nb_targets];

to:

std::vector<int> path_vect(nb_targets);

I just guessing here, so someone with C++ experience please jump in!

-Steve

> This link:
> http://stackoverflow.com/questions/9550712/variable-length-array-of-non-pod-element-type-string-aka-basic-stringchar
> suggests that the code relies on a g++ extension of the language standard?
>
> Alec
>
>
>
>
> On May 28, 2013, at 4:15 PM, Stephen Woodbridge <woodbri at swoodbridge.com> wrote:
>
>> I made these changes and they compile and work in linux, so I just pushed them. do another pull and try again.
>>
>> Let me know how that goes,
>>   -Steve
>>
>> On 5/28/2013 4:11 PM, Stephen Woodbridge wrote:
>>> Actually, it looks like there are two occurances that need to be changed.
>>>
>>> -Steve
>>>
>>> On 5/28/2013 4:07 PM, Stephen Woodbridge wrote:
>>>> On 5/28/2013 3:51 PM, Alec Gosse wrote:
>>>>> Hello,
>>>>>
>>>>> I just pulled the latest in the sew_devel_2-0 branch and got the
>>>>> following compiler error under Mac 10.8.
>>>>>
>>>>> /usr/local/src/pgrouting_main/src/kdijkstra/src/k_targets_boost_wrapper.cpp:341:26:
>>>>>
>>>>> error: variable length array of non-POD element type
>>>>>        'vector<int>'
>>>>>      vector<int> path_vect[nb_targets];
>>>>>
>>>>> I can confirm that this does not occur on my Ubuntu machine.
>>>>
>>>> Hi Alec,
>>>>
>>>> I'm not very good with C++, but as a guess, can you edit that line 341
>>>> and change it from:
>>>>
>>>> vector<int> path_vect[nb_targets];
>>>>
>>>> to:
>>>>
>>>> std::vector<int> path_vect[nb_targets];
>>>>
>>>>
>>>> And let me know if that fixes your compile problem.
>>>>
>>>> Thanks,
>>>>    -Steve
>>>> _______________________________________________
>>>> pgrouting-dev mailing list
>>>> pgrouting-dev at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>>>
>>> _______________________________________________
>>> pgrouting-dev mailing list
>>> pgrouting-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>>
>> _______________________________________________
>> pgrouting-dev mailing list
>> pgrouting-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>



More information about the pgrouting-dev mailing list