Experimental Physics and Industrial Control System
|
I think the attached is a minimum working example. Compiling it gives the following:
C:\Users\patrick.thomas\Desktop\example>gmake
gmake -C ./configure install
gmake[1]: Entering directory 'C:/Users/patrick.thomas/Desktop/example/configure'
perl C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/bin/windows-x64/makeMakefile.pl O.windows-x64 ../..
perl -MExtUtils::Command -e mkpath O.Common
gmake -C O.windows-x64 -f ../Makefile TOP=../.. \
T_A=windows-x64 install
gmake[2]: Entering directory 'C:/Users/patrick.thomas/Desktop/example/configure/O.windows-x64'
perl C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/bin/windows-x64/convertRelease.pl checkRelease
gmake[2]: Leaving directory 'C:/Users/patrick.thomas/Desktop/example/configure/O.windows-x64'
gmake[1]: Leaving directory 'C:/Users/patrick.thomas/Desktop/example/configure'
gmake -C ./adsApp install
gmake[1]: Entering directory 'C:/Users/patrick.thomas/Desktop/example/adsApp'
gmake -C ./src install
gmake[2]: Entering directory 'C:/Users/patrick.thomas/Desktop/example/adsApp/src'
perl C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/bin/windows-x64/makeMakefile.pl O.windows-x64 ../../..
perl -MExtUtils::Command -e mkpath O.Common
gmake -C O.windows-x64 -f ../Makefile TOP=../../.. \
T_A=windows-x64 install
gmake[3]: Entering directory 'C:/Users/patrick.thomas/Desktop/example/adsApp/src/O.windows-x64'
perl C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/bin/windows-x64/makeIncludeDbd.pl base.dbd adsSupport.dbd adsInclude.dbd
echo "../O.Common/adsInclude.dbd : ../Makefile" >> ads.dbd.d
"Expanding dbd"
"Installing dbd file ../../../dbd/adsSupport.dbd"
mkdir ../../../dbd
"Installing created dbd file ../../../dbd/ads.dbd"
cl -EHsc -GR -c -favor:blend -nologo -FC -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -Ox -GL -Oy- -W3 -w44355 -w44344 -w44251 -MD -TP -I. -I..\\O.Common -I. -I.. -I..\\..\\..\\include\\os\\WIN32 -I..\\..\\..\\include
-IC:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\include\\os\\WIN32 -IC:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\include ..\\devADS.cpp
devADS.cpp
link -nologo -subsystem:windows -dll -LTCG -incremental:no -opt:ref -release -MACHINE:X64 -implib:adsSupport.lib -out:adsSupport.dll devADS.obj C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\recIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\softDevIoc.lib
C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\miscIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\rsrvIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\dbtoolsIoc.lib
C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\asIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\dbIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\registryIoc.lib
C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\dbStaticIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\ca.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\Com.lib
Creating library adsSupport.lib and object adsSupport.exp
Generating code
Finished generating code
"Installing shared library ../../../bin/windows-x64/adsSupport.dll"
mkdir ../../../bin
mkdir ../../../bin/windows-x64
"Installing library ../../../lib/windows-x64/adsSupport.lib"
mkdir ../../../lib
mkdir ../../../lib/windows-x64
perl C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/bin/windows-x64/registerRecordDeviceDriver.pl ../O.Common/ads.dbd ads_registerRecordDeviceDriver C:/Users/patrick.thomas/Desktop/example > ads.tmp
perl -MExtUtils::Command -e mv ads.tmp ads_registerRecordDeviceDriver.cpp
cl -EHsc -GR -c -favor:blend -nologo -FC -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -Ox -GL -Oy- -W3 -w44355 -w44344 -w44251 -MD -TP -I. -I..\\O.Common -I. -I.. -I..\\..\\..\\include\\os\\WIN32 -I..\\..\\..\\include
-IC:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\include\\os\\WIN32 -IC:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\include ads_registerRecordDeviceDriver.cpp
ads_registerRecordDeviceDriver.cpp
cl -EHsc -GR -c -favor:blend -nologo -FC -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -Ox -GL -Oy- -W3 -w44355 -w44344 -w44251 -MD -TP -I. -I..\\O.Common -I. -I.. -I..\\..\\..\\include\\os\\WIN32 -I..\\..\\..\\include
-IC:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\include\\os\\WIN32 -IC:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\include ..\\adsMain.cpp
adsMain.cpp
link -nologo -LTCG -incremental:no -opt:ref -release -MACHINE:X64 -out:ads.exe ads_registerRecordDeviceDriver.obj adsMain.obj ..\\..\\..\\lib\\windows-x64\\adsSupport.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\recIoc.lib
C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\softDevIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\miscIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\rsrvIoc.lib
C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\dbtoolsIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\asIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\dbIoc.lib
C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\registryIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\dbStaticIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\ca.lib
C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64\\Com.lib
ads_registerRecordDeviceDriver.obj : error LNK2001: unresolved external symbol __imp_pvar_dset_bi_DevSet
ads_registerRecordDeviceDriver.obj : error LNK2001: unresolved external symbol __imp_pvar_func_devADSRegistrar
ads.exe : fatal error LNK1120: 2 unresolved externals
gmake[3]: *** [C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/configure/RULES_BUILD:191: ads.exe] Error 1120
gmake[3]: Leaving directory 'C:/Users/patrick.thomas/Desktop/example/adsApp/src/O.windows-x64'
gmake[2]: *** [C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/configure/RULES_ARCHS:61: install.windows-x64] Error 2
gmake[2]: Leaving directory 'C:/Users/patrick.thomas/Desktop/example/adsApp/src'
gmake[1]: *** [C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/configure/RULES_DIRS:83: src.install] Error 2
gmake[1]: Leaving directory 'C:/Users/patrick.thomas/Desktop/example/adsApp'
gmake: *** [C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/configure/RULES_DIRS:83: adsApp.install] Error 2
-Patrick
From: Thomas, Patrick
Sent: Wednesday, May 22, 2019 11:44 AM
To: [email protected]
Subject: registerRecordDeviceDriver.obj unresolved external symbols
Hi,
I was wondering if someone might be able to help me track down the source of these linking errors when compiling an IOC with custom device support. I am using EPICS base 3.14.12.8 and Microsoft Visual Studio Community 2017 on Windows 10 Enterprise 64 bit.
link -nologo -incremental:no -opt:ref -release -MACHINE:X64 -out:ads.exe ads_registerRecordDeviceDriver.obj adsMain.obj ..\\..\\..\\lib\\windows-x64-static\\adsSupport.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64-static\\recIoc.lib
C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64-static\\softDevIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64-static\\miscIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64-static\\rsrvIoc.lib
C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64-static\\dbtoolsIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64-static\\asIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64-static\\dbIoc.lib
C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64-static\\registryIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64-static\\dbStaticIoc.lib C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64-static\\ca.lib
C:\\Users\\patrick.thomas\\Desktop\\epics\\base-3.14.12.8\\lib\\windows-x64-static\\Com.lib ws2_32.lib advapi32.lib user32.lib kernel32.lib winmm.lib
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_dset_ai_DevSet referenced in function "void __cdecl `dynamic initializer for 'devsl''(void)" (??__Edevsl@@YAXXZ)
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_dset_ao_DevSet referenced in function "void __cdecl `dynamic initializer for 'devsl''(void)" (??__Edevsl@@YAXXZ)
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_dset_bi_DevSet referenced in function "void __cdecl `dynamic initializer for 'devsl''(void)" (??__Edevsl@@YAXXZ)
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_dset_bo_DevSet referenced in function "void __cdecl `dynamic initializer for 'devsl''(void)" (??__Edevsl@@YAXXZ)
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_dset_longin_DevSet referenced in function "void __cdecl `dynamic initializer for 'devsl''(void)" (??__Edevsl@@YAXXZ)
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_dset_longout_DevSet referenced in function "void __cdecl `dynamic initializer for 'devsl''(void)" (??__Edevsl@@YAXXZ)
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_dset_mbbi_DevSet referenced in function "void __cdecl `dynamic initializer for 'devsl''(void)" (??__Edevsl@@YAXXZ)
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_dset_mbbo_DevSet referenced in function "void __cdecl `dynamic initializer for 'devsl''(void)" (??__Edevsl@@YAXXZ)
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_dset_stringin_DevSet referenced in function "void __cdecl `dynamic initializer for 'devsl''(void)" (??__Edevsl@@YAXXZ)
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_dset_stringout_DevSet referenced in function "void __cdecl `dynamic initializer for 'devsl''(void)" (??__Edevsl@@YAXXZ)
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_func_devADSRegistrar referenced in function ads_registerRecordDeviceDriver
ads_registerRecordDeviceDriver.obj : error LNK2019: unresolved external symbol pvar_func_initTraceRegister referenced in function ads_registerRecordDeviceDriver
ads.exe : fatal error LNK1120: 12 unresolved externals
gmake[3]: *** [C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/configure/RULES_BUILD:191: ads.exe] Error 1120
gmake[3]: Leaving directory 'C:/Users/patrick.thomas/Desktop/ads/adsApp/src/O.windows-x64-static'
gmake[2]: *** [C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/configure/RULES_ARCHS:61: install.windows-x64-static] Error 2
gmake[2]: Leaving directory 'C:/Users/patrick.thomas/Desktop/ads/adsApp/src'
gmake[1]: *** [C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/configure/RULES_DIRS:83: src.install] Error 2
gmake[1]: Leaving directory 'C:/Users/patrick.thomas/Desktop/ads/adsApp'
gmake: *** [C:/Users/patrick.thomas/Desktop/epics/base-3.14.12.8/configure/RULES_DIRS:83: adsApp.install] Error 2
Makefile:
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#=============================
# Build the IOC support library
LIBRARY_IOC += adsSupport
# Install devXxxSoft.dbd into <top>/dbd
#DBD += xxxSupport.dbd
DBD += adsSupport.dbd
# Compile and add the code to the support library
adsSupport_SRCS += devADS.cpp
# Link locally-provided code into the support library,
# rather than directly into the IOC application.
USR_CPPFLAGS += /std:c++latest
TcAdsDll_DIR += C:\TwinCAT\AdsApi\TcAdsDll\x64\lib
adsSupport_LIBS += TcAdsDll
adsSupport_LIBS += $(EPICS_BASE_IOC_LIBS)
#=============================
# Build the IOC application
PROD_IOC = ads
# ads.dbd will be created and installed
DBD += ads.dbd
# ads.dbd will be made up from these files:
ads_DBD += base.dbd
# Include dbd files from all support applications:
#ads_DBD += xxx.dbd
ads_DBD += adsSupport.dbd
# Add all the support libraries needed by this IOC
#ads_LIBS += xxx
ads_LIBS += adsSupport
# ads_registerRecordDeviceDriver.cpp derives from ads.dbd
ads_SRCS += ads_registerRecordDeviceDriver.cpp
# Build the main IOC entry point on workstation OSs.
ads_SRCS_DEFAULT += adsMain.cpp
ads_SRCS_vxWorks += -nil-
# Add support from base/src/vxWorks if needed
#ads_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
# Finally link to the EPICS Base libraries
ads_LIBS += $(EPICS_BASE_IOC_LIBS)
#===========================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
Thank you,
Patrick
|
Attachment:
example.zip
Description: example.zip
- Replies:
- Re: registerRecordDeviceDriver.obj unresolved external symbols Johnson, Andrew N. via Tech-talk
- References:
- registerRecordDeviceDriver.obj unresolved external symbols Thomas, Patrick via Tech-talk
- Navigate by Date:
- Prev:
Re: Scanning 101 Mark Rivers via Tech-talk
- Next:
Re: registerRecordDeviceDriver.obj unresolved external symbols Johnson, Andrew N. via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: registerRecordDeviceDriver.obj unresolved external symbols Torsten Bögershausen via Tech-talk
- Next:
Re: registerRecordDeviceDriver.obj unresolved external symbols Johnson, Andrew N. via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|
ANJ, 23 May 2019 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|