Hello Tech-Talk,
I’m trying to compile an IOC that has a single PV created using pvDatabase, pvData and pvAccess facilities. I’m using the “database” example in exampleCPP and also “NDPluginPVA.cpp” from ADCore as the models on how to do this task.
Basically I have an
an EPICS shell function that will has the following code:
PVDatabasePtr master = PVDatabase::getMaster();
string recordName = “my_record_name”;
NTScalarBuilderPtr ntScalarBuilder = NTScalar::createBuilder();
PVStructurePtr pvStructure = ntScalarBuilder->
value(pvInt)->
addAlarm()->
addTimeStamp()->
createPVStructure();
PVRecordPtr pvRecord = PVRecord::create(recordName,pvStructure);
bool result = master->addRecord(pvRecord);
The above code is include in the source of the support library built together with the IOC. The Makefile looks like this:
mySupport_LIBS += qsrv nt pvDatabase
mySupport_LIBS += $(EPICS_BASE_PVA_CORE_LIBS)
mySupport_LIBS += $(EPICS_BASE_IOC_LIBS)
I’ve also included the same libs for the IOC rules:
myIOC_LIBS += mySupport
myIOC_LIBS += qsrv nt pvDatabase
myIOC_LIBS += $(EPICS_BASE_PVA_CORE_LIBS)
myIOC_DBD += PVAServerRegister.dbd
myIOC_DBD += qsrv.dbd
However, when I compile the module, the linking process shows that there are two undefined references:
mySupport.so: undefined reference to `epics::pvDatabase::PVDatabase::addRecord(std::shared_ptr<epics::pvDatabase::PVRecord> const&)'
mySupport.so: undefined reference to `epics::pvDatabase::PVRecord::create(std::string const&, std::shared_ptr<epics::pvData::PVStructure> const&)'
I would appreciate any help to overcome these basics steps.
Thanks in advance!
______________________
Joao Paulo Martins
Control Systems Engineer
European Spallation Source ERIC