epics-base / pva2pva

PV Access gateway/proxy and EPICS Process Database integration
https://epics-base.github.io/pva2pva/
Other
4 stars 13 forks source link

QSRV: Warnings / error on native Windows build #9

Closed ralphlange closed 6 years ago

ralphlange commented 6 years ago

Compiling on native Windows (MSVC 12.0), pva2pva fails after spitting out loads of C4275 warnings with a C2664:

C:/Users/langer/Documents/Work/EPICS/merge7/bundle/include\pv/configuration.h(249) : warning C4275: non dll-interface class 'epics::pvData::NoDefaultMethods' used as base for dll-interface class 'epics::pvAccess::ConfigurationFactory'
        C:/Users/langer/Documents/Work/EPICS/merge7/bundle/include\pv/noDefaultMethods.h(50) : see declaration of 'epics::pvData::NoDefaultMethods'
        C:/Users/langer/Documents/Work/EPICS/merge7/bundle/include\pv/configuration.h(248) : see declaration of 'epics::pvAccess::ConfigurationFactory'
c:\users\langer\documents\work\epics\merge7\bundle\modules\pva2pva\pdbapp\pdbsingle.h(23) : warning C4275: non dll-interface struct 'PDBPV' used as base for dll-interface struct 'PDBSinglePV'
        c:\users\langer\documents\work\epics\merge7\bundle\modules\pva2pva\pdbapp\pdb.h(16) : see declaration of 'PDBPV'
        c:\users\langer\documents\work\epics\merge7\bundle\modules\pva2pva\pdbapp\pdbsingle.h(22) : see declaration of 'PDBSinglePV'
c:\users\langer\documents\work\epics\merge7\bundle\modules\pva2pva\pdbapp\pdbgroup.h(74) : warning C4275: non dll-interface struct 'PDBPV' used as base for dll-interface struct 'PDBGroupPV'
        c:\users\langer\documents\work\epics\merge7\bundle\modules\pva2pva\pdbapp\pdb.h(16) : see declaration of 'PDBPV'
        c:\users\langer\documents\work\epics\merge7\bundle\modules\pva2pva\pdbapp\pdbgroup.h(73) : see declaration of 'PDBGroupPV'
c:\users\langer\documents\work\epics\merge7\bundle\modules\pva2pva\pdbapp\pdbgroup.h(136) : warning C4275: non dll-interface struct 'BaseChannel' used as base for dll-interface struct 'PDBGroupChannel'
        ../../common\pvahelper.h(19) : see declaration of 'BaseChannel'
        c:\users\langer\documents\work\epics\merge7\bundle\modules\pva2pva\pdbapp\pdbgroup.h(136) : see declaration of 'PDBGroupChannel'
../pdb.cpp(61) : error C2664: 'std::shared_ptr<PVIFBuilder>::shared_ptr(std::shared_ptr<PVIFBuilder> &&) throw()' : cannot convert argument 1 from 'std::auto_ptr<PVIFBuilder>' to 'std::auto_ptr<PVIFBuilder> &&'
        You cannot bind an lvalue to an rvalue reference
../pdb.cpp(508) : warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data
C:/Users/langer/Documents/Work/EPICS/merge7/bundle/configure/RULES_BUILD:237: recipe for target 'pdb.obj' failed
make[4]: Leaving directory 'C:/Users/langer/Documents/Work/EPICS/merge7/bundle/modules/pva2pva/pdbApp/O.windows-x64'
mdavidsaver commented 6 years ago

The error is now addressed.

As for the C4275 warning, there are a tremendous number of these from all the PVA modules (cf. NoDefaultMethods) with no apparent ill effects. I don't have any plans to address this warning.