[Insight-developers] Need VS help to resolve dashboard link errors

Bill Lorensen bill.lorensen at gmail.com
Fri Nov 19 21:04:20 EST 2010


Strange. On my mingw build, the ITKBasic_Filters_EXPORTS is defined in
the flags. That's a good clue. I'll see where the -D is generated.
Something must be different for VS.

I'm trying to resolve a warning that I get on mingw. However, VS does
not give the warning with the original code.

It seems like more trouble than it is worth. I might just back it out.
Of test if mingw is the platform.

Thanks,

Bill

On Fri, Nov 19, 2010 at 6:30 PM, Wes Turner <wes.turner at kitware.com> wrote:
> Just a clue, but not (quite) a solution yet.  In generating the ITKCommon
> library project file, the symbol /D ITKCommon_EXPORTS is defined on the
> compile line.  That turns the declspec(dllimport) to declspec(dllexport) for
> the compilation of the library and makes the symbols available to other
> libraries that link with it.  There is no such /D ITKBasic_Filters_EXPORTS
> generated for the itkBasicFilters library.  Adding this manually to the
> build line of the itkBasicFIlters seems to fix the problem (although you may
> also need to specify /bigobj as well).  I do not know where that string gets
> appended to the compile line for itkCommon, but where ever it is, it needs
> to be replicated for itkBasicFilters
> - Wes
>
> On Fri, Nov 19, 2010 at 5:22 PM, Wes Turner <wes.turner at kitware.com> wrote:
>>
>> Yep.  It shows up on the shared build.  I got called away, or I would have
>> answered earlier. The issue seems to be that the import dclspec doesn't make
>> sense for templated code that gets compiled right into the source (i.e.
>> there is external shared library from which to import it).  So I cannot set
>> the modifier on the itkImageExport to be ITKBasicFilters_EXPORT.  It needs
>> to remain ITK_EXPORT.  But if the base class and the derived class don't
>> have the same specification, then the signature that VS generated for the
>> call doesn't match the one assumed within the derived class ...
>> Of course if I undo your change so that the base class has the same
>> specification (ITK_EXPORT) as the derived class, it seems to work correctly.
>> So we may need to refer this to Brad or Dave for a resolution.
>> BTW: What issue were you trying to address?  Changing
>> ITKBasicFilters_EXPORT to ITK_EXPORT in itkVTKImageExport.h seems to resolve
>> all the problems, but that seems to be what it was before you applied your
>> patch.  Am I missing something?
>> - Wes
>>
>> On Fri, Nov 19, 2010 at 4:43 PM, Bill Lorensen <bill.lorensen at gmail.com>
>> wrote:
>>>
>>> Wes,
>>>
>>> I fixed that problem (ITKCommon_EXPORT) yesterday. I didn't go through
>>> gerrit since it was an emergency.
>>>
>>> This is a different problem, only visible on shared VS builds.
>>>
>>> I think it is because itkVTKImageExportBase derives from ProcessObject
>>> which is in Common.
>>>
>>> Not sure though.
>>>
>>> Bill
>>>
>>> On Fri, Nov 19, 2010 at 12:41 PM, Wes Turner <wes.turner at kitware.com>
>>> wrote:
>>> > Bill,
>>> > Your change removed the line:
>>> > #define ITKCommon_EXPORT
>>> > From the else clause,where you have, (correctly):
>>> > #define ITKBasicFilters_EXPORT
>>> > My experimental submission with the ITKCommon_EXPORT definition
>>> > restored is
>>> > still building, but it doesn't seem to be throwing the same errors that
>>> > I
>>> > saw before I put the fix in.
>>> > - Wes
>>> > On Fri, Nov 19, 2010 at 9:59 AM, Bill Lorensen
>>> > <bill.lorensen at gmail.com>
>>> > wrote:
>>> >>
>>> >> I have enough compilers on my laptop...
>>> >>
>>> >> On Fri, Nov 19, 2010 at 8:58 AM, Bradley Lowekamp
>>> >> <blowekamp at mail.nih.gov> wrote:
>>> >> > Have you tried the free MS Visual Studio Express?
>>> >> > http://www.microsoft.com/express/
>>> >> >
>>> >> > On Nov 19, 2010, at 8:24 AM, Bill Lorensen wrote:
>>> >> >
>>> >> > Folks,
>>> >> >
>>> >> > I recently, after Gerrit review
>>> >> > http://review.source.kitware.com/#change,371 checked in changes to
>>> >> > resolve dll linkage problems in BasicFilters. The changes worked on
>>> >> > my
>>> >> > mingw build and (after fixing a stupiod mistake) on my linux build.
>>> >> >
>>> >> > However, today the VS builds are failing. Unfortunately, I don't
>>> >> > have
>>> >> > access to an ITK supported VS compiler. Can someone see if they can
>>> >> > resolve the problem? If not, I'll back put the changes.
>>> >> >
>>> >> > Thanks,
>>> >> >
>>> >> > Bill
>>> >> > _______________________________________________
>>> >> > Powered by www.kitware.com
>>> >> >
>>> >> > Visit other Kitware open-source projects at
>>> >> > http://www.kitware.com/opensource/opensource.html
>>> >> >
>>> >> > Kitware offers ITK Training Courses, for more information visit:
>>> >> > http://kitware.com/products/protraining.html
>>> >> >
>>> >> > Please keep messages on-topic and check the ITK FAQ at:
>>> >> > http://www.itk.org/Wiki/ITK_FAQ
>>> >> >
>>> >> > Follow this link to subscribe/unsubscribe:
>>> >> > http://www.itk.org/mailman/listinfo/insight-developers
>>> >> >
>>> >> > ========================================================
>>> >> >
>>> >> > Bradley Lowekamp
>>> >> >
>>> >> > Lockheed Martin Contractor for
>>> >> >
>>> >> > Office of High Performance Computing and Communications
>>> >> >
>>> >> > National Library of Medicine
>>> >> >
>>> >> > blowekamp at mail.nih.gov
>>> >> >
>>> >> >
>>> >> _______________________________________________
>>> >> Powered by www.kitware.com
>>> >>
>>> >> Visit other Kitware open-source projects at
>>> >> http://www.kitware.com/opensource/opensource.html
>>> >>
>>> >> Kitware offers ITK Training Courses, for more information visit:
>>> >> http://kitware.com/products/protraining.html
>>> >>
>>> >> Please keep messages on-topic and check the ITK FAQ at:
>>> >> http://www.itk.org/Wiki/ITK_FAQ
>>> >>
>>> >> Follow this link to subscribe/unsubscribe:
>>> >> http://www.itk.org/mailman/listinfo/insight-developers
>>> >
>>> >
>>> >
>>> > --
>>> > Wesley D. Turner, Ph.D.
>>> > Kitware, Inc.
>>> > Technical Leader
>>> > 28 Corporate Drive
>>> > Clifton Park, NY 12065-8662
>>> > Phone: 518-881-4920
>>> >
>>
>>
>>
>> --
>> Wesley D. Turner, Ph.D.
>> Kitware, Inc.
>> Technical Leader
>> 28 Corporate Drive
>> Clifton Park, NY 12065-8662
>> Phone: 518-881-4920
>
>
>
> --
> Wesley D. Turner, Ph.D.
> Kitware, Inc.
> Technical Leader
> 28 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4920
>


More information about the Insight-developers mailing list