EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Failed to create single DLLs on Windows
From: "Wang Xiaoqiang" <[email protected]>
To: "epics" <[email protected]>
Date: Wed, 6 May 2009 14:12:13 +0200

Hi,

On windows, with cygwin-x86 and win32-x86 host arch, I have compiled
EPICS base 
to create shared libraries.

Then I setup a simple application to create a DLL, and it complains
undefined reference (error output below).
I understand that this is because epicsShareExtern is defined as
__declspec(dllimport).
Linker is instructed to call these functions in some DLLs which is not
true, since I
also compiled these functions in.
On the other hand, it builds successfully using the Makefile.support,
which separates
the actual functions to a DLL, to satisfy the linker. That looks a bit
awkward. 

Because of my limited knowledge, I would ask gurus, are there other
solutions to 
such a pecular situation. Actually asyn/testManager example has a
similar problem, 
which wants to creat a single EXE.

Thanks in advance.


==== here starts the make output for cygwin-x86 ===
make -C O.cygwin-x86 -f ../Makefile TOP=../../.. T_A=cygwin-x86 install
make[1]: Entering directory `/w/test/epicsdum/dumApp/src/O.cygwin-x86'
g++ -o dum.dll -shared -Wl,--out-implib,dum.lib
-L/usr/local/epics/base/lib/cygwin-x86
dum_registerRecordDeviceDriver.o dumHello.o    -lrecIoc -lsoftDevIoc
-lmiscIoc -lrsrvIoc -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc
-ldbStaticIoc -lca -lCom  -lpthread   -lreadline -lcurses -lm
dum_registerRecordDeviceDriver.o:dum_registerRecordDeviceDriver.cpp:(.te
xt+0x7): undefined reference to `__imp__pvar_func_helloRegister'
dum_registerRecordDeviceDriver.o:dum_registerRecordDeviceDriver.cpp:(.te
xt+0x37): undefined reference to `__imp__pvar_func_helloRegister'
dum_registerRecordDeviceDriver.o:dum_registerRecordDeviceDriver.cpp:(.te
xt+0x58): undefined reference to `__imp__pvar_int_helloVariable'
Creating library file: dum.lib
collect2: ld returned 1 exit status
make[1]: *** [dum.dll] Error 1
make[1]: Leaving directory `/w/test/epicsdum/dumApp/src/O.cygwin-x86'


--
Dr. Xiaoqiang Wang
Paul Scherrer Institut, WBGB/010
5232 Villigen PSI, Switzerland

Attachment: epicsdum.tgz
Description: epicsdum.tgz


Replies:
RE: Failed to create single DLLs on Windows Wang Xiaoqiang

Navigate by Date:
Prev: Alarm if no status update received for a given time Martin Konrad
Next: RE: Alarm if no status update received for a given time Dalesio, Leo
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Alarm if no status update received for a given time Ralph Lange
Next: RE: Failed to create single DLLs on Windows Wang Xiaoqiang
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·