[vtkusers] VtkExodusReader.cxx compile error with Intel Compiler on OS X

Mike Jackson mike.jackson at imts.us
Fri Oct 6 11:07:29 EDT 2006


I now have:

vtkStdString blocks = "";

And it compiles just fine now..

This is with OS X 10.4.8 and the Intel Compiler on a MacBook Pro. Just FYI.

Should I post a bug or will this get put into CVS by someone?

Thanks
Mike Jackson

On 10/6/06 9:44 AM, "David Cole" <david.cole at kitware.com> wrote:

> Have you tried this:
> vtkStdString blocks;
> 
> or this:
> vtkStdString blocks = "";
> 
> Just eliminate the "static" keyword if that works... It's only used in
> this sort of construct to prevent people from accessing it from another
> .cxx file with:
> extern vtkStdString blocks;
> 
> And since nobody is doing that and we don't really care if somebody
> tries to do that... it should be ok to eliminate "static" if that makes
> it work...
> 
> 
> David
> 
> 
> Mike Jackson wrote:
> 
>> On 10/6/06 9:26 AM, "Mathieu Malaterre" <mathieu.malaterre at kitware.com>
>> wrote:
>> 
>>  
>> 
>>> Mike Jackson wrote:
>>>    
>>> 
>>>> I am trying to compile vtk 5.0.2 with the Intel Compiler on OS X. The
>>>> compile made it all the way to vtkHybrib where it threw a linker error:
>>>> 
>>>> ld: common symbols not allowed with MH_DYLIB output format with the
>>>> -multi_module option
>>>> CMakeFiles/vtkHybrid.dir/vtkExodusReader.o definition of common
>>>> __ZGVZN17vtkExodusMetadata16GetPartBlockInfoEiE6blocks (size 16)
>>>> CMakeFiles/vtkHybrid.dir/vtkExodusReader.o definition of common
>>>> __ZZN17vtkExodusMetadata16GetPartBlockInfoEiE6blocks (size 16)
>>>> libtool: internal link edit command failed
>>>> 
>>>> Googling for this type of error reveals that the offending line of code is
>>>> at line 633 of vtkExodusReader.cxx which is:
>>>> 
>>>> static vtkStdString blocks;
>>>>      
>>>> 
>>> can you try this:
>>> 
>>> static vtkStdString blocks = "";
>>> 
>>> 
>>> thx
>>> -Mathieu
>>>    
>>> 
>> 
>> Same error...
>> 
>> Can we use a vtkSmartPointer for this?
>> 
>> VtkSmartPointer<vtkStdString> blocks = vtkSmartPointer<vtkStdString>::New();
>> 
>> Since I do not know the code I guess I don't understand why "blocks" has to
>> be static.
>> 
>>  
>> 







More information about the vtkusers mailing list