EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2012  2013  2014  2015  <20162017  2018  2019  Index 2012  2013  2014  2015  <20162017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: newbie question
From: Andrew Johnson <[email protected]>
To: Rolf Keitel <[email protected]>, <[email protected]>
Date: Tue, 12 Jan 2016 15:19:17 -0600
Hi Rolf,

On 01/12/2016 02:30 PM, Rolf Keitel wrote:
> I am developing on Windows 10.
> I have done some initial exploring of Qt using the MSVC compiler and
> debugger.
> 
> Now I want to build a simple CA client () and I have a valid EPICS build
> (done with Mingw).
> I assume I need to build my Qt application also with Mingw if I want to
> use Com.dll and ca.dll from the EPICS build.
> Is this correct?
> (I remember from long time ago that DLLs built with MSVC and Borland C++
> were incompatible due to different name mangling).

That's a good question, but you actually *might* be able to combine them
in this particular case; here's why:

The API that ca.dll provides is a pure C API, for which there should be
no name mangling going on (internally the ca.dll implementation is
written in C++, but that's of no concern here). There are a number of
C++ APIs in the Com.dll which the ca.dll code calls, but those are
pre-compiled so should also be of no concern.

As long as your client code never tries to use any of the Com.dll C++
APIs directly, the fact that the MSVC name mangling is incompatible with
Mingw's (really GCC's) name mangling may allow you to mix code from the
two compilers.

You may even be able to call the C APIs from Com.dll if you need them in
your client code, but I'm not 100% sure of that.

However to be honest I would probably just bite the bullet and build
Base with MSVC; it isn't hard to do and it might save you some hassle.

I would be interested to hear your results if you do try to mix the
compilers in this way though.

- Andrew

-- 
There are only two hard problems in distributed systems:
  2. Exactly-once delivery
  1. Guaranteed order of messages
  2. Exactly-once delivery
 -- Mathias Verraes

References:
newbie question Rolf Keitel

Navigate by Date:
Prev: newbie question Rolf Keitel
Next: RE: EPICS CA Interface for caQtDM and epicsqt Zai Wang
Index: 2012  2013  2014  2015  <20162017  2018  2019 
Navigate by Thread:
Prev: newbie question Rolf Keitel
Next: RE: EPICS CA Interface for caQtDM and epicsqt Zai Wang
Index: 2012  2013  2014  2015  <20162017  2018  2019 
ANJ, 03 Jan 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·