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

Subject: RE: MCA under windows7 64-bit
From: <[email protected]>
To: <[email protected]>, <[email protected]>, <[email protected]>
Date: Fri, 17 Jun 2016 15:51:41 +0000
Hi Hinko,

I see the mex compile is using    -DEPICS_DLL_NO   which is the pre-processor define for static rather than shared libraries,  as you mention "shared vs. static build issue" I'm guessing your EPICS base is built as DLLs then? If it is a DLL build then, assuming you can see the variables being exported as Mark describes below, does removing  the  -DEPICS_DLL_NO    from mex make a difference? Alternatively, you could try building your EPICS base as a static library if it is currently a DLL

Regards,

Freddie

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Rivers
Sent: 17 June 2016 12:24
To: Hinxx; EPICS Tech-Talk
Subject: RE: MCA under windows7 64-bit

You have 3 undefined symbols:

dbr_value_size
dbr_size
dbf_text_dim

Those values should all be defined in ca.dll from EPICS base as shown by the following:

H:\epics\base\bin\windows-x64>dumpbin /exports ca.dll Microsoft (R) COFF/PE Dumper Version 10.00.40219.01 Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file ca.dll

File Type: DLL

  Section contains the following exports for ca.dll

    00000000 characteristics
    563B82C4 time date stamp Thu Nov 05 10:24:36 2015
        0.00 version
           1 ordinal base
         166 number of functions
         166 number of names

    ordinal hint RVA      name

          1    0 0000F6E0 ??0bhe@@QEAA@AEAVepicsMutex@@AEBVepicsTime@@IAEBVinetAddrID@@@Z
          2    1 000011F0 ??0bheMemoryManager@@QEAA@AEBV0@@Z
          3    2 000011F0 ??0bheMemoryManager@@QEAA@XZ
          4    3 000011A0 ??0cacChannel@@QEAA@AEAVcacChannelNotify@@@Z
          5    4 000010D0 ??0cacChannelNotify@@QEAA@AEBV0@@Z
          6    5 000010D0 ??0cacChannelNotify@@QEAA@XZ
          7    6 000010F0 ??0cacContext@@QEAA@AEBV0@@Z
          8    7 000010F0 ??0cacContext@@QEAA@XZ
          9    8 00001180 ??0cacContextNotify@@QEAA@AEBV0@@Z
         10    9 00001180 ??0cacContextNotify@@QEAA@XZ
         11    A 000010B0 ??0cacReadNotify@@QEAA@AEBV0@@Z
         12    B 000010B0 ??0cacReadNotify@@QEAA@XZ
         13    C 00001190 ??0cacService@@QEAA@AEBV0@@Z
         14    D 00001190 ??0cacService@@QEAA@XZ
         15    E 000010C0 ??0cacStateNotify@@QEAA@AEBV0@@Z
         16    F 000010C0 ??0cacStateNotify@@QEAA@XZ
         17   10 000010A0 ??0cacWriteNotify@@QEAA@AEBV0@@Z
         18   11 000010A0 ??0cacWriteNotify@@QEAA@XZ
         19   12 0000F390 ??1bhe@@QEAA@XZ
         20   13 0000F330 ??1bheMemoryManager@@UEAA@XZ
         21   14 00023DA0 ??1cacChannel@@MEAA@XZ
         22   15 00023D00 ??1cacChannelNotify@@UEAA@XZ
         23   16 00023D30 ??1cacContext@@UEAA@XZ
         24   17 00023CF0 ??1cacContextNotify@@UEAA@XZ
         25   18 00023CC0 ??1cacReadNotify@@UEAA@XZ
         26   19 00023D10 ??1cacService@@UEAA@XZ
         27   1A 00023CA0 ??1cacStateNotify@@UEAA@XZ
         28   1B 00023CB0 ??1cacWriteNotify@@UEAA@XZ
         29   1C 00001320 ??2bhe@@SAPEAX_KAEAVbheMemoryManager@@@Z
         30   1D 0000F350 ??3bhe@@CAXPEAX@Z
         31   1E 00001330 ??3bhe@@SAXPEAXAEAVbheMemoryManager@@@Z
         32   1F 000010E0 ??4bheMemoryManager@@QEAAAEAV0@AEBV0@@Z
         33   20 000010E0 ??4cacChannelNotify@@QEAAAEAV0@AEBV0@@Z
         34   21 000010E0 ??4cacContext@@QEAAAEAV0@AEBV0@@Z
         35   22 000010E0 ??4cacContextNotify@@QEAAAEAV0@AEBV0@@Z
         36   23 000010E0 ??4cacReadNotify@@QEAAAEAV0@AEBV0@@Z
         37   24 000010E0 ??4cacService@@QEAAAEAV0@AEBV0@@Z
         38   25 000010E0 ??4cacStateNotify@@QEAAAEAV0@AEBV0@@Z
         39   26 000010E0 ??4cacWriteNotify@@QEAAAEAV0@AEBV0@@Z
         40   27 00004480 ??8stringId@@QEBA_NAEBV0@@Z
         41   28 00035848 ??_7bheMemoryManager@@6B@
         42   29 00035578 ??_7cacChannel@@6B@
         43   2A 000356A8 ??_7cacChannelNotify@@6B@
         44   2B 000356F8 ??_7cacContext@@6B@
         45   2C 00035738 ??_7cacContextNotify@@6B@
         46   2D 00035660 ??_7cacReadNotify@@6B@
         47   2E 00035778 ??_7cacService@@6B@
         48   2F 00035680 ??_7cacStateNotify@@6B@
         49   30 00035640 ??_7cacWriteNotify@@6B@
         50   31 00023DE0 ?accessRights@cacChannel@@UEBA?AVcaAccessRights@@AEAV?$epicsGuard@VepicsMutex@@@@@Z
         51   32 00023D80 ?beaconPeriod@cacChannel@@UEBANAEAV?$epicsGuard@VepicsMutex@@@@@Z
         52   33 00045F68 ?caClientCallbackThreadId@@3PEAUepicsThreadPrivateOSD@@EA
         53   34 0000ED20 ?caInstallDefaultService@@YAXAEAVcacService@@@Z
         54   35 00018AE0 ?caRepeaterRegistrationMessage@@YAX_KII@Z
         55   36 00019870 ?caStartRepeaterIfNotInstalled@@YAXI@Z
         56   37 0001DF70 ?ca_repeater@@YAXXZ
         57   38 00023D60 ?ca_v42_ok@cacChannel@@UEBA_NAEAV?$epicsGuard@VepicsMutex@@@@@Z
         58   39 00023CD0 ?callbackProcessingCompleteNotify@cacContextNotify@@UEAAXXZ
         59   3A 00023CE0 ?callbackProcessingInitiateNotify@cacContextNotify@@UEAAXXZ
         60   3B 00023D50 ?connected@cacChannel@@UEBA_NAEAV?$epicsGuard@VepicsMutex@@@@@Z
         61   3C 00023ED0 ?getHostName@cacChannel@@UEBAIAEAV?$epicsGuard@VepicsMutex@@@@PEADI@Z
         62   3D 000011C0 ?notify@cacChannel@@QEBAAEAVcacChannelNotify@@XZ
         63   3E 00023E70 ?pHostName@cacChannel@@UEBAPEBDAEAV?$epicsGuard@VepicsMutex@@@@@Z
         64   3F 0000F540 ?period@bhe@@QEBANAEAV?$epicsGuard@VepicsMutex@@@@@Z
         65   40 0002F4AC ?priorityArchive@cacChannel@@2IB
         66   41 0002F444 ?priorityDefault@cacChannel@@2IB
         67   42 0002F464 ?priorityLinksDB@cacChannel@@2IB
         68   43 0002F294 ?priorityMax@cacChannel@@2IB
         69   44 0002F2D4 ?priorityMin@cacChannel@@2IB
         70   45 0002F4EC ?priorityOPI@cacChannel@@2IB
         71   46 00023D70 ?receiveWatchdogDelay@cacChannel@@UEBANAEAV?$epicsGuard@VepicsMutex@@@@@Z
         72   47 0000F480 ?registerIIU@bhe@@QEAAXAEAV?$epicsGuard@VepicsMutex@@@@AEAVtcpiiu@@@Z
         73   48 000011C0 ?resourceName@stringId@@QEBAPEBDXZ
         74   49 00023D90 ?searchAttempts@cacChannel@@UEBAIAEAV?$epicsGuard@VepicsMutex@@@@@Z
         75   4A 0000F590 ?show@bhe@@QEBAXAEAV?$epicsGuard@VepicsMutex@@@@I@Z
         76   4B 0000F670 ?show@bhe@@QEBAXI@Z
         77   4C 0000F400 ?unregisterIIU@bhe@@QEAAXAEAV?$epicsGuard@VepicsMutex@@@@AEAVtcpiiu@@@Z
         78   4D 0000F7F0 ?updatePeriod@bhe@@QEAA_NAEAV?$epicsGuard@VepicsMutex@@@@AEBVepicsTime@@1II@Z
         79   4E 0000F4E0 ?updateTime@bhe@@QEBA?AVepicsTime@@AEAV?$epicsGuard@VepicsMutex@@@@@Z
         80   4F 00031F80 DBR_XXXXToEpicsType
         81   50 000224C0 addAddrToChannelAccessAddressList
         82   51 0001F920 caNetConvert
         83   52 0001E290 caRepeaterThread
         84   53 00023980 ca_add_exception_event
         85   54 000234C0 ca_add_fd_registration
         86   55 00023040 ca_add_masked_array_event
         87   56 0000D100 ca_array_get
         88   57 0000CFE0 ca_array_get_callback
         89   58 0000C790 ca_array_put
         90   59 0000CEB0 ca_array_put_callback
         91   5A 00022AE0 ca_attach_context
         92   5B 00023290 ca_beacon_anomaly_count
         93   5C 0000C1A0 ca_beacon_period
         94   5D 00023C60 ca_build_and_connect
         95   5E 0000C840 ca_change_connection_event
         96   5F 00022990 ca_channel_status
         97   60 00022D90 ca_clear_channel
         98   61 00022D80 ca_clear_event
         99   62 0000E0D0 ca_clear_subscription
        100   63 000231C0 ca_client_status
        101   64 00023080 ca_context_create
        102   65 00022A00 ca_context_destroy
        103   66 00022B50 ca_context_status
        104   67 00023A60 ca_create_channel
        105   68 0000CD10 ca_create_subscription
        106   69 00022970 ca_current_context
        107   6A 00022940 ca_detach_context
        108   6B 0001E2C0 ca_dump_dbr
        109   6C 0000C3E0 ca_element_count
        110   6D 00022B70 ca_evid_to_chid
        111   6E 0000C430 ca_field_type
        112   6F 00023640 ca_flush_io
        113   70 0000C650 ca_get_host_name
        114   71 00023330 ca_get_ioc_connection_count
        115   72 0000C600 ca_host_name
        116   73 000229D0 ca_message
        117   74 00044700 ca_message_text
        118   75 00022A60 ca_modify_host_name
        119   76 00022A50 ca_modify_user_name
        120   77 0000C250 ca_name
        121   78 00023960 ca_pend
        122   79 00023840 ca_pend_event
        123   7A 00023720 ca_pend_io
        124   7B 00022AA0 ca_preemtive_callback_is_enabled
        125   7C 0000C560 ca_puser
        126   7D 0000C300 ca_read_access
        127   7E 0000C140 ca_receive_watchdog_delay
        128   7F 0000C480 ca_replace_access_rights_event
        129   80 000233D0 ca_replace_printf_handler
        130   81 00023C30 ca_search_and_connect
        131   82 0000C200 ca_search_attempts
        132   83 00022C00 ca_self_test
        133   84 0000C5B0 ca_set_puser
        134   85 00027DC0 ca_sg_array_get
        135   86 00027F90 ca_sg_array_put
        136   87 00028650 ca_sg_block
        137   88 00028AA0 ca_sg_create
        138   89 00028770 ca_sg_delete
        139   8A 00028540 ca_sg_reset
        140   8B 00028410 ca_sg_stat
        141   8C 00028170 ca_sg_test
        142   8D 00022D60 ca_signal
        143   8E 00022C60 ca_signal_formated
        144   8F 00022D40 ca_signal_with_file_and_lineno
        145   90 0000C360 ca_state
        146   91 00022B80 ca_task_exit
        147   92 00023140 ca_task_initialize
        148   93 0001F7E0 ca_test_event
        149   94 00023580 ca_test_io
        150   95 0000C0F0 ca_v42_ok
        151   96 000229C0 ca_version
        152   97 0000C2A0 ca_write_access
        153   98 000226A0 configureChannelAccessAddressList
        154   99 000448F0 dbf_text
        155   9A 0002EFEC dbf_text_dim
        156   9B 000446F8 dbf_text_invalid
        157   9C 00032020 dbr_size
        158   9D 00044940 dbr_text
        159   9E 0002F0DC dbr_text_dim
        160   9F 000448E8 dbr_text_invalid
        161   A0 000320C0 dbr_value_class
        162   A1 00032160 dbr_value_offset
        163   A2 00032070 dbr_value_size
        164   A3 00031DF8 epicsTypeToDBR_XXXX
        165   A4 00022250 printChannelAccessAddressList
        166   A5 00022320 removeDuplicateAddresses

  Summary

        3000 .data
        3000 .pdata
       17000 .rdata
        1000 .reloc
        1000 .rsrc
       2C000 .text

This output is for EPICS base 3.14.12.5, which is the same as you are using.

One possible problem I see is the Makefile you are using is linking ca.lib after Com.lib.  This does not seem correct, Com.lib should be linked after ca.lib.  You should try swapping those in the Makefile.

Mark

________________________________________
From: [email protected] [[email protected]] on behalf of Hinxx [[email protected]]
Sent: Friday, June 17, 2016 1:55 AM
To: EPICS Tech-Talk
Subject: MCA under windows7 64-bit

Hi,

I'm trying to get MCA R4-4 extension built under Windows7, 64-bit, for Matlab 2016a. I'm using Microsoft Windows SDK v7.1 and set of compilers that SDK provides (VS2010?).
EPICS base compilation goes nicely through, using windows-x64 target.

Compiler reports:

c:\MATLAB\R2016a\toolbox\mca>cl
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64 Copyright (C) Microsoft Corporation. All rights reserved.


MCA compile line taken from one of the alt_compile files in mca.

c:\MATLAB\R2016a\toolbox\mca>mex mca.cpp MCAError.cpp Channel.cpp c:\base-3.14.12.5\lib\windows-x64\Com.lib
c:\base-3.14.12.5\lib\windows-x64\ca.lib -DDB_TEXT_ LBLSOURCE -DMSCC -DEPICS_DLL_NO -DWIN64 -Ic:\base-3.14.12.5\include
-Ic:\base-3.14.12.5\include\os\WIN32 -v -DWIN32

[... lots of cruft that I can post if needed ...]


I'm seeing this problem when linking:


link /nologo /manifest /DLL /EXPORT:mexFunction C:\Users\dummy\AppData\Local\Temp\mex_162312581152441_3188\mca.obj
C:\Users\dummy\AppData\Local\Temp\mex_1623
2581152441_3188\MCAError.obj
C:\Users\dummy\AppData\Local\Temp\mex_162312581152441_3188\Channel.obj
c:\base-3.14.12.5\lib\windows-x64\Com.lib c:\base-3.14.12.
\lib\windows-x64\ca.lib
/LIBPATH:"C:\MATLAB\R2016a\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib omdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /out:mca.mexw64 Creating library mca.lib and object mca.exp Channel.obj : error LNK2019: unresolved external symbol dbr_value_size referenced in function "private: void __cdecl Channel::AllocChanMem(void)" (?AllocChanMe
@Channel@@AEAAXXZ)
Channel.obj : error LNK2019: unresolved external symbol dbr_size referenced in function "private: void __cdecl Channel::AllocChanMem(void)" (?AllocChanMem@Chan
el@@AEAAXXZ)
Channel.obj : error LNK2019: unresolved external symbol dbf_text_dim referenced in function "private: void __cdecl Channel::AllocChanMem(void)" (?AllocChanMem@
hannel@@AEAAXXZ)
mca.mexw64 : fatal error LNK1120: 3 unresolved externals


Looking a bit into ca access.cpp source, epicsShareDef is used for dbr_value_size, dbr_size and dbf_text_dim.
Am I hitting shared vs. static build issue?
I'm also not sure if the -DWIN32 is adequate in MCA compile line - I want 64-bit mca mex object.

Any pointers welcomed.

Thanks,
Hinko



References:
MCA under windows7 64-bit Hinxx
RE: MCA under windows7 64-bit Mark Rivers

Navigate by Date:
Prev: RE: MCA under windows7 64-bit Mark Rivers
Next: Re: MCA under windows7 64-bit Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: MCA under windows7 64-bit Mark Rivers
Next: Re: MCA under windows7 64-bit Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·