Dave,
This could have to do with your Visual Studio settings. It could be that everything in EPICS base was built for 64-bit, but you are linking with some 32-bit Windows DLLs
because you don’t have Visual Studio set up correctly for the 64-bit build build.
Here is how I do it on my Windows machine when I want to build for both 32-bit and 64-bit on the same machine.
I have 2 shortcuts on the desktop, one for 32-bit and one for 64-bit.
The Properties/Shortcut/Target of the 32-bit shortcut is:
C:\Windows\System32\cmd.exe /K C:\EPICS\setup_epics_vs2010_win32.bat
The Properties/Shortcut/Target of the 64-bit shortcut is:
C:\Windows\System32\cmd.exe /K C:\EPICS\setup_epics_vs2010_win64.bat
This is the contents of the 32-bit batch file, C:\EPICS\setup_epics_vs2010_win32.bat:
set EPICS_HOST_ARCH=win32-x86
set PATH=C:\Program Files (x86)\GnuWin32\bin;C:\Program Files (x86)\re2c;C:\Perl64\bin;H:\epics\base\bin\win32-x86;%PATH%
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
This is the contents of the 64-bit batch file, C:\EPICS\setup_epics_vs2010_win64.bat:
set EPICS_HOST_ARCH=windows-x64
set PATH=C:\Program Files (x86)\GnuWin32\bin;C:\Program Files (x86)\re2c;C:\Perl64\bin;H:\epics\base\bin\win32-x86;%PATH%
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_amd64
Note that the 32-bit and 64-bit batch files differ in the argument passed to vcvarsall.bat. It is “x86” for 32-bit and “x86_amd64” for 64-bit.
Mark
Hello…
I’m trying to build EPICS baseR3.14.12.4 on a windows64 machine, and I’ve run into the following issue:
link /nologo /subsystem:windows /dll /MANIFEST /LTCG /incremental:no /opt:ref /r
elease /version:3.14 /MACHINE:X64 /implib:Com.lib /out:Com.dll buck
etLib.obj epicsRingPointer.obj epicsRingBytes.obj postfix.obj calcPerform.obj cv
tFast.obj resourceLib.obj epicsOnce.obj epicsSingletonMutex.obj dbmf.obj ellLib.
obj envSubr.obj envData.obj errlog.obj errSymLib.obj errSymTbl.obj fdmgr.obj fdM
anager.obj freeListLib.obj gpHashLib.obj iocsh.obj registry.obj libComRegister.o
bj iocLog.obj logClient.obj macCore.obj macEnv.obj macUtil.obj aToIPAddr.obj adj
ustment.obj cantProceed.obj epicsConvert.obj epicsExit.obj epicsStdlib.obj epics
String.obj truncateFile.obj ipAddrToAsciiAsynchronous.obj epicsUnitTest.obj epic
sThread.obj epicsMutex.obj epicsEvent.obj epicsTime.obj epicsMessageQueue.obj ep
icsMath.obj epicsGeneralTime.obj osiClockTime.obj osdSock.obj osdSockAddrReuse.o
bj osiSock.obj systemCallIntMech.obj epicsSocketConvertErrnoToString.obj osdAsse
rt.obj osdFindSymbol.obj osdInterrupt.obj osdPoolStatus.obj osdSignal.obj osdEnv
.obj epicsReadline.obj epicsTempFile.obj epicsStdio.obj osdStdio.obj osdThread.o
bj osdMutex.obj osdEvent.obj osdTime.obj osdProcess.obj osdNetIntf.obj osdMessag
eQueue.obj devLibVME.obj devLibVMEOSD.obj taskwd.obj epicsTimer.obj timer.obj ti
merQueue.obj timerQueueActive.obj timerQueueActiveMgr.obj timerQueuePassive.obj
tsDefs.obj epicsGetopt.obj setThreadName.obj forceBadAllocException.obj Com.res
ws2_32.lib advapi32.lib user32.lib
bucketLib.obj : fatal error LNK1112: module machine type 'X86' conflicts with ta
rget machine type 'x64'
../../../configure/RULES_BUILD:291: recipe for target 'Com.dll' failed
make[3]: *** [Com.dll] Error 88
make[3]: Leaving directory '/cygdrive/c/epics/base/src/libCom/O.windows-x64'
../../configure/RULES_ARCHS:63: recipe for target 'install.windows-x64' failed
make[2]: *** [install.windows-x64] Error 2
make[2]: Leaving directory '/cygdrive/c/epics/base/src/libCom'
../configure/RULES_DIRS:70: recipe for target 'libCom.install' failed
make[1]: *** [libCom.install] Error 2
make[1]: Leaving directory '/cygdrive/c/epics/base/src'
configure/RULES_DIRS:70: recipe for target 'src.install' failed
make: *** [src.install] Error 2
I have EPICS_HOST_ARCH set to windows-x64.
Any thoughts on what I may be doing wrong? Thanks…
Dave
David Reid
Software Engineer, Behavior
www.alleninstitute.org