Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018 
<== Date ==> <== Thread ==>

Subject: RE: Problem linking a Channel Access application on Windows using Visual Studio
From: Steven.Banks@doi.vic.gov.au
To: "Russ Berg" <Russ.Berg@lightsource.ca>, "Jeff Hill" <johill@lanl.gov>
Cc: tech-talk@aps.anl.gov
Date: Mon, 12 Jan 2004 12:03:22 +1100
Hi Russ and Jeff,

Thanks for your help on this.  The problem was fixed by using the /MD or
/MDd options (which stand for Multithreaded DLL).  According to the Visual
Studio Help, these options "put in a layer of code that allows the linker
to resolve external references."

This option is mentioned in the README.WIN32 file that you referred me to
Jeff.

Steve Banks
Australian Synchrotron Project
Department of Infrastructure
Level 18, 80 Collins Street
Melbourne   VIC   3000
tel:  +613 9655 6303
fax:  +613 9655 8666
web: www.synchrotron.vic.gov.au


                                                                                                                                       
                      "Russ Berg"                                                                                                      
                      <Russ.Berg@lights        To:       "Jeff Hill" <johill@lanl.gov>, <Steven.Banks@doi.vic.gov.au>,                 
                      ource.ca>                 <tech-talk@aps.anl.gov>                                                                
                                               cc:                                                                                     
                      10/01/04 02:17 AM        Subject:  RE: Problem linking a Channel Access application on Windows using Visual      
                                                Studio                                                                                 
                                                                                                                                       




Hi Steve,
I just added dbf_type_to_DBR_TIME to a project that I have been working
on and it linked up fine, I stepped through the call and it is using
dbf_text_dim instead of _dbf_text_dim, so my thought is that you may
have a name mangling issue. I am using Borland C++ Builder 6 and I have
to import the DLL to a .lib file before I can use it, in that process I
handle the name mangling. The import utils are implib and impdef, both
come with cppbuilder.

In case your interested here is a help dump of each:

H:\>impdef

Borland Impdef Version 3.0.22 Copyright (c) 1991, 2000 Inprise
Corporation

Syntax: IMPDEF [options] destname[.def] srcname[.dll]
Options:
    -a     Add '_' alias for MS flavor cdecl functions
    -h     Emit hints


H:\>implib

Borland Implib Version 3.0.22 Copyright (c) 1991, 2000 Inprise
Corporation

Syntax: IMPLIB [options] libname[.lib] [@respfile | srcname] [srcname
......]
 Options:
    -a     Add '_' alias for MS flavor cdecl functions
    -c     Case sensitive symbols
    -f     Force imports by name (with hints)
    -w     No Warnings

Respfile may contain a list of source files to process.
Wildcards are ok for .DLL and .DEF file names.



-Russ

-----Original Message-----
From: Jeff Hill [mailto:johill@lanl.gov]
Sent: Thursday, January 08, 2004 4:55 PM
To: Steven.Banks@doi.vic.gov.au; tech-talk@aps.anl.gov
Subject: RE: Problem linking a Channel Access application on Windows
using Visual Studio



Steve,

The file README.WIN32 in the R3.14.4 distribution has a discussion about
building application outside of the EPICS build system. Read section (6)
for the details. Let me know if you are still experiencing troubles.

Jeff


> -----Original Message-----
> From: Steven.Banks@doi.vic.gov.au [mailto:Steven.Banks@doi.vic.gov.au]
> Sent: Tuesday, January 06, 2004 10:06 PM
> To: tech-talk@aps.anl.gov
> Subject: Problem linking a Channel Access application on Windows using

> Visual Studio
>
> G'day,
>
> I'm hoping that someone can help me with a problem I'm having with
> linking a Channel Access (3.14.4) program that I'm writing on windows
> 2000 using Visual Studio C++ Version 6.0.
>
> Everything was compiling and linking fine (using a variety of
> different Channel Access functions) until I found that I needed to use

> the dbf_type_to_DBR_TIME macro which is defined in db_access.h.  At
> this point, attempting to link the application resulted in the
> following error:
>
> ============================================================
> --------------------Configuration: mcatest - Win32
> Debug--------------------
> Linking...
> Channel.obj : error LNK2001: unresolved external symbol _dbf_text_dim
> Debug/mcatest.exe : fatal error LNK1120: 1 unresolved externals Error
> executing link.exe.
>
> mcatest.exe - 2 error(s), 0 warning(s)
> ============================================================
>
> The symbol dbf_text_dim is used by the macro dbf_type_to_DBR_TIME and
> is defined in access.cpp.  I've checked with the Visual Studio
> Dependency Walker and have verified that dbf_text_dim is in the ca.dll

> and ca.lib files.
>
> I am at a loss to understand why the linker cannot resolve this
> symbol. Is there anyone out there who can tell me what I need to do to

> get my application to link correctly so that I can use the
> dbf_type_to_DBR_TIME macro?
>
> Steve Banks
> Australian Synchrotron Project
> Department of Infrastructure
> Level 18, 80 Collins Street
> Melbourne   VIC   3000
> tel:  +613 9655 6303
> fax:  +613 9655 8666
> web: www.synchrotron.vic.gov.au










Navigate by Date:
Prev: Re: Running epics in background in linux Brian McAllister
Next: compile error of EPICS 3.14.4 under windows dong-jun park
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018 
Navigate by Thread:
Prev: RE: Problem linking a Channel Access application on Windows using Visual Studio Russ Berg
Next: R3.14 compatible drvSerial and drvAscii Allan Honey
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·