Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: Re: Solution to install MCA on Windows
From: "Steven Banks" <Steven.Banks@synchrotron.vic.gov.au>
To: "Gan Quan" <ganq@ihep.ac.cn>;tech-talk@aps.anl.gov
Date: Sun, 04 Jun 2006 13:49:12 +1000
Here is a cut-and-paste from our Matlab Installation Procedure for Windows
at the Australian Synchrotron:

************************************************************************
1. Copy the file mca.tar.gz to the <matlab>\toolbox directory, where
<matlab> is the root directory when MATLAB was installed.

2. Unzip the file using Winzip.  This should create a directory named
<matlab>\toolbox\mca.

3.	In the mca directory, edit the file mcacompile.m and modify it so that
it contains the following:

cd <matlab>\toolbox\mca
mex mca.cpp C:\epics\base\lib\win32-x86\Com.lib ...
                C:\epics\base\lib\win32-x86\ca.lib ...
                -DDB_TEXT_GLBLSOURCE -D_WIN32 -DEPICS_DLL_NO ...
                -IC:\epics\base\include ...
                -IC:\epics\base\include\os\WIN32 ...
                -v

4. Start MATLAB by double clicking on the MATLAB desktop icon.

5. Add the directory <matlab>\toolbox\mca to the MATLAB search path by
selecting File->Set Path.  Click on the ?Add with Subfolders? button and
select the folder <matlab>\toolbox\mca.  Press the Save button and then
the Close button.

6. In the MATLAB command window, type the following command:

>> mex -setup

Respond ?y? to let MATLAB search for installed compilers, select the
option to use the MS Visual C/C++ Version 6.0 compiler and type ?y? to
confirm that this is correct.

7. In the MATLAB command window, type the following command:

>> mcacompile

This will create the file mca.dll.
***********************************************************************

Hope this helps.

Dr. Steven M. Banks ? Control Systems Engineer 
Australian Synchrotron Project 
Major Projects Victoria 
800 Blackburn Road 
CLAYTON VIC 3168 
tel: +613 8540 4103 
fax: +613 8540 4200 

mailto:steven.banks@synchrotron.vic.gov.au 
http://www.synchrotron.vic.gov.au 

-----Original Message-----
From: "Gan Quan" <ganq@ihep.ac.cn>
To: tech-talk@aps.anl.gov
Date: Sat, 3 Jun 2006 16:52:32 +0800
Subject: Solution to install MCA on Windows

> The cause of error LNK2001 is that MCA cannot find ca.lib and Com.lib. 
> 
> "cd" to the MCA root directory and run:
> 
> mex -ID:\Tools\Epics\base-3.14.7\include -ID:\Tools\Epics\base-3.14.7
> \include\os\WIN32 -v  mca.cpp MCAError.cpp Channel.cpp
> ChannelAccess.cpp  
> dbStaticHost.lib ca.lib Com.lib
> 
> If you use MSVC to compile, you may find:
> mca.cpp(588) : error C2065: 'min' : undeclared identifier
> 
> Then,you need to modify mca.cpp and add a line:
> #define min(a, b) (((a) < (b)) ? (a) : (b))
> 
> Recompile, you will succeed.



Replies:
Thanks for help Gan Quan
References:
Solution to install MCA on Windows Gan Quan

Navigate by Date:
Prev: Solution to install MCA on Windows Gan Quan
Next: Thanks for help Gan Quan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Solution to install MCA on Windows Gan Quan
Next: Thanks for help Gan Quan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·