Background for linux-y types like myself. 'winmm' is MultiMedia.
'asynSetMinTimerPeriod()' wraps 'timeBeginPeriod()'.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd757624%28v=vs.85%29.aspx
On 08/25/2016 09:22 AM, Mark Rivers wrote:
> Hi Andrew,
>
> ... At the time I added it I suggested this should really be put in base, not in asyn but I added it there to get it deployed quickly.
Suggestions are nice, but can get lost or forgotten. A launchpad
wishlist ticket, or a merge request is better.
>
> The asyn Makefile has the line:
> asyn_SYS_LIBS_WIN32 = ws2_32 Winmm
>
> On Microsoft compilers I believe this is sufficient to ensure that all applications built with asyn will be linked with winmm, because I never needed to add winmm to the SYS_LIBS when building products. However, for mingw this is not true, winmm must be explicitly linked with.
>
> It would be a real pain to modify every Makefile that builds products that use asyn to include this SYS_LIB! So instead I made this change, adding -lwinmm to the OP_SYS_LDLIBS in base.
FYI, situations like this are why I maintain a patch for the debian
package of Base which looks in a directory $(EPICS_BASE)/conf.d/ so
external modules can inject makefile snippets.
https://github.com/epicsdeb/epics-base/blob/master/debian/patches/0003-allow-more-flexible-makefile-config.patch
Originally for the sequencer build rules, though it also came in handy
to inject libpcre into applications using streamdevice when I enabled
this conditional dependency.
https://github.com/epicsdeb/stream/blob/master/debian/50stream-pcre.make
> corvette:base-3.15.4/configure/os>diff CONFIG.linux-x86.win32-x86-mingw.orig CONFIG.linux-x86.win32-x86-mingw
> 23,24c23,24
> < # Link with winsock2
> < OP_SYS_LDLIBS = -lws2_32
> ---
>> # Link with winsock2 and mm
>> OP_SYS_LDLIBS = -lws2_32 -lwinmm
>
> I think this would be a good thing to add to EPICS base. It is harmless when asyn is not being used, and if you do decide to move the setMinTimerPeriod from asyn to base then it will be needed there anyway.
>
> Mark
>
> ________________________________________
> From: Mark Rivers
> Sent: Wednesday, August 24, 2016 10:02 PM
> To: Johnson, Andrew N.
> Subject: RE: mingw woes
>
> Hi Andrew,
>
> I just figured it out.
>
> asyn.lib is linked with winmm, a Windows system library. On Microsoft that is sufficient to ensure that all applications built with asyn.lib also link with winnm. On mingw that is not true, the applications must also be explicitly linked with winmm.
>
> Another question: when I build base with mingw it builds some dlls, and also large .lib files. However, in the synApps tree it does not build any .dll files, only large .lib files. I have actually been able to build softGlue OK, but I worry it is not a fair test, because it seems to be building statically, not dynamically?
>
> Thanks,
> Mark
>
> ________________________________________
> From: Johnson, Andrew N. [[email protected]]
> Sent: Wednesday, August 24, 2016 9:58 PM
> To: Mark Rivers
> Subject: Re: mingw woes
>
> Hi Mark,
>
> The _WIN32 macro means the OS interface uses the Win32 API, not that the compiler is the Microsoft one. Mingw uses tine Win32 API (headers, libraries etc.) with gcc as the compiler, so _WIN32 is meant to be defined for that target. There may be code in libCom/osi/os/Win32 that is Mingw specific, and I think there's a macro too.
>
> I don't know what Winmm is, are you missing a header or a library? I would suggest a Google search to see if anyone else has the same error and a solution.
>
> - Andrew
>
- References:
- RE: mingw woes Mark Rivers
- Navigate by Date:
- Prev:
RE: mingw woes Mark Rivers
- Next:
Re: mingw woes Andrew Johnson
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
2025
- Navigate by Thread:
- Prev:
RE: mingw woes Mark Rivers
- Next:
Re: mingw woes Andrew Johnson
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
2025
|