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  <20182019  2020  2021  2022  2023  2024  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Error LNK2005 building Diamond's nullhttpd module on Windows
From: "J. Lewis Muir" <[email protected]>
To: EPICS Tech-Talk <[email protected]>
Date: Wed, 16 May 2018 17:22:18 -0500
On 05/16, J. Lewis Muir wrote:
> It was noted in a private email that the <nullhttpd>/src/nullhttpd.h
> header contains the following lines in a WIN32 ifdef which appear to add
> a library-search record to the object file and define _MT to 1:
> 
> ===
> #pragma comment(lib, "libcmt.lib")
> #pragma comment(lib, "wsock32.lib")
> #define _MT 1
> ===
> 
> I tried reverting the "/NODEFAULTLIB:LIBCMT.lib" change and
> commenting out the "libcmt.lib" pragma line and the _MT define
> line, but still no dice; it's the same error I got after making the
> "/NODEFAULTLIB:LIBCMT.lib" change (full output at the end of this
> email):
> 
> ===
> link -nologo -subsystem:windows -dll -LTCG -incremental:no -opt:ref -release       -implib:nullhttpd.lib -out:nullhttpd.dll         cgi.obj files.obj http.obj win32.obj config.obj format.obj server.obj main.obj
> server.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
> ===

After more web searching, I tried adding the following to the WIN32
ifdef in <nullhttpd>src/nullhttpd.h:

===
#pragma comment(lib, "user32.lib")
===

And now it compiles successfully!

But this is just a bunch of hacking; I don't know enough about Windows
to know what's the right thing to do.  I'll report back once I have
things narrowed down a bit.

Lewis

Replies:
RE: Error LNK2005 building Diamond's nullhttpd module on Windows Freddie Akeroyd - UKRI STFC
References:
Error LNK2005 building Diamond's nullhttpd module on Windows J. Lewis Muir
Re: Error LNK2005 building Diamond's nullhttpd module on Windows J. Lewis Muir
Re: Error LNK2005 building Diamond's nullhttpd module on Windows J. Lewis Muir

Navigate by Date:
Prev: Re: Error LNK2005 building Diamond's nullhttpd module on Windows J. Lewis Muir
Next: RE: Error LNK2005 building Diamond's nullhttpd module on Windows Freddie Akeroyd - UKRI STFC
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Error LNK2005 building Diamond's nullhttpd module on Windows J. Lewis Muir
Next: RE: Error LNK2005 building Diamond's nullhttpd module on Windows Freddie Akeroyd - UKRI STFC
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 16 May 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·