Yep, I needed to define H5_BUILT_AS_DYNAMIC_LIB as a command line argument when building the Nexus library. It builds correctly now.
Thanks,
Mark
________________________________________
From: Andrew Johnson [[email protected]]
Sent: Friday, August 23, 2013 8:50 AM
To: Mark Rivers
Cc: Pete R Jemian; Jan Ilavsky; 'Mark Koennecke'; Madden, Timothy J.; '[email protected]'; '[email protected]'; 'Glowacki, Arthur T.'; Schwarz, Nicholas; [email protected]
Subject: Re: Problems compiling Nexus library as DLL on Windows
Hi Mark,
On 08/22/2013 10:21 PM, Mark Rivers wrote:
> The problem is that when H5Tpublic.h is being included the macro
> H5_DLLVAR is not correctly defined to be "__declspec(dllimport)".
> Rather H5_DLLVAR appears to be defined as "extern". This causes the
> linker to be unable to locate these symbols, even though they are
> correctly exported by the .lib file.
>
> I just need to figure out why H5_DLLVAR is not being correctly
> defined in H5api_adpt.h. It looks like it should be, but clearly I
> am doing something wrong.
Decorators like that are a common issue with Windows builds, EPICS has
the epicsShare* macros defined in shareLib.h which on Windows expand to
__declspec(dllimport) when calling the relevant symbol from a DLL,
__declspec(dllexport) when building the DLL, or to nothing when building
or calling a static library.
You may have to add a command-line argument to the compiler to define
some symbol that tells the header whether the Nexus library is being
built as a DLL, or being called in one. Look in the header that defines
H5_DLLVAR and compare what it's doing with what shareLib.h does.
HTH,
- Andrew
--
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock
- References:
- Problems compiling Nexus library as DLL on Windows Mark Rivers
- RE: Problems compiling Nexus library as DLL on Windows Mark Rivers
- Re: Problems compiling Nexus library as DLL on Windows Andrew Johnson
- Navigate by Date:
- Prev:
Re: Problems compiling Nexus library as DLL on Windows Andrew Johnson
- Next:
Re: streamdevice to find the last match Dirk Zimoch
- 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: Problems compiling Nexus library as DLL on Windows Andrew Johnson
- Next:
Asyn AutoConnect and stream device on a soft IOC Scott Baily
- 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
|