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  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026  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  <20252026 
<== Date ==> <== Thread ==>

Subject: Re: Windows static build
From: "Johnson, Andrew N. via Tech-talk" <[email protected]>
To: "Thomas, Patrick" <[email protected]>, "[email protected] Talk" <[email protected]>
Date: Wed, 10 Sep 2025 17:13:04 +0000
Hi Patrick,

Not sure if you did this, but on Windows you always have to pair setting STATIC_BUILD=YES with SHARED_LIBRARIES=NO, or use the windows-x64-static target architecture (set EPICS_HOST_ARCH to that before compiling if you weren’t setting it at all before). The advantage of using the -static target arch is that you can have both architectures built in the same Base tree and use them for different IOCs.

HTH,

- Andrew


-- 

Complexity comes for free, Simplicity you have to work for.


On 9/10/25, 11:41 AM, "Tech-talk" <[email protected]> wrote:

Hello,

I created an example IOC with the following commands on Windows 10 and successfully compiled it with gmake:

../../base-7.0/bin/windows-x64/makeBaseApp.pl -t example ads
../../base-7.0/bin/windows-x64/makeBaseApp.pl -i -a windows-x64 -t example example

I then added STATIC_BUILD=YES to the CONFIG_SITE file, ran gmake distclean, and tried to compile it again. This time the compilation failed with this error:

   Creating library adsSupport.lib and object adsSupport.exp
xxxRecord.obj : error LNK2001: unresolved external symbol epicsNAN
adsSupport.dll : fatal error LNK1120: 1 unresolved externals
gmake[3]: *** [C:/Users/patrick.thomas/Desktop/files/gitlab/base-7.0/configure/RULES_BUILD:317: adsSupport.dll] Error 1120
gmake[3]: Leaving directory 'C:/Users/patrick.thomas/Desktop/files/gitlab/tmp/epics7-ads/adsApp/src/O.windows-x64'
gmake[2]: *** [C:/Users/patrick.thomas/Desktop/files/gitlab/base-7.0/configure/RULES_ARCHS:58: install.windows-x64] Error 2
gmake[2]: Leaving directory 'C:/Users/patrick.thomas/Desktop/files/gitlab/tmp/epics7-ads/adsApp/src'
gmake[1]: *** [C:/Users/patrick.thomas/Desktop/files/gitlab/base-7.0/configure/RULES_DIRS:85: src.install] Error 2
gmake[1]: Leaving directory 'C:/Users/patrick.thomas/Desktop/files/gitlab/tmp/epics7-ads/adsApp'
gmake: *** [C:/Users/patrick.thomas/Desktop/files/gitlab/base-7.0/configure/RULES_DIRS:85: adsApp.install] Error 2

Would someone happen to know what I might be doing wrong?

Thank you,
Patrick

Replies:
Re: Windows static build Thomas, Patrick via Tech-talk
References:
Windows static build Thomas, Patrick via Tech-talk

Navigate by Date:
Prev: Windows static build Thomas, Patrick via Tech-talk
Next: Re: Windows static build Thomas, Patrick 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  <20252026 
Navigate by Thread:
Prev: Windows static build Thomas, Patrick via Tech-talk
Next: Re: Windows static build Thomas, Patrick 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  <20252026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·