Hi,
Can you just try the following to check your compiler is working correctly
From a new command window run vcvarsall.bat x64 which for me is running the command
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
But your visual studio may be a different version or in a different location. It should reply with something like
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.5
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Now create a simple test.c file containing
#include <stdio.h>
int main(int argc, char* argv[])
{
printf("Test\n");
return 0;
}
Now try and build this file with
cl test.c
which should generate output to screen like
C:\Users> cl test.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.41.34123 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
test.c
Microsoft (R) Incremental Linker Version 14.41.34123.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:test.exe
test.obj
if that works try running the executable
C:\Users> test.exe
Test
Regards,
Freddie
> -----Original Message-----
> From: Federico Galdenzi <galdenzi at roma2.infn.it>
> Sent: 29 April 2025 10:05
> To: tech-talk at aps.anl.gov
> Cc: Akeroyd, Freddie (STFC,RAL,ISIS) <freddie.akeroyd at stfc.ac.uk>; Rivers
> <rivers at cars.uchicago.edu>
> Subject: Re: EPICS build problem
>
>
> Dear Freddie and Mark, thanks again for your help. As you can see here in the
> logs i still have the bug of not finding stdio.h and assert.h in my computer.
> I know that this is basic but i cant' really find a solution.
>
> Regards, Federico.
> Il 2025-04-16 17:42 Freddie Akeroyd - STFC UKRI ha scritto:
> > Hi,
> >
> > The windows.bat / win32.bat files just run vcvarsall.bat, set
> > EPICS_HOST_ARCH and add perl to the PATH, so are just convenient
> > shortcuts and not strictly necessary
> >
> > When vcvarsall.bat is run it needs an argument to tell it the build
> > architecture, and this needs to match your intended EPICS_HOST_ARCH.
> > So try
> >
> > vcvarsall.bat x64
> > set EPICS_HOST_ARCH=windows-x64
> >
> > for a 64bit build. If you needed a 32bit built it would be:
> >
> > vcvarsall.bat x86
> > set EPICS_HOST_ARCH=win32-x86
> >
> > Regards,
> >
> > Freddie
> >
> > -----Original Message-----
> > From: Federico Galdenzi <galdenzi at roma2.infn.it>
> > Sent: 16 April 2025 14:18
> > To: Akeroyd, Freddie (STFC,RAL,ISIS) <freddie.akeroyd at stfc.ac.uk>
> > Cc: Rivers <rivers at cars.uchicago.edu>; tech-talk at aps.anl.gov
> > Subject: Re: EPICS build problem
> >
> > Hi Freddie,
> >
> > I've followed this part of the tutorial:
> > -------------------------------------------
> > Download the distribution from e.g.
> > https://urldefense.us/v3/__https://epics-controls.org/download/base/base-7.0.4.1.tar.gz__;!!G_uCfscf7eWS!b1VOPd55aMpieZhLKuO5fB6xHdr4WQtS91bqVyiSoXDI-F_tOKheBmTAOnLr1yjNIzyHCSLQj88T6elXs4WxNO-mVLVqhKbCHqs$ .
> >
> > Unpack it into a work directory.
> >
> > Open a Windows command prompt and change into the directory you
> > unpacked EPICS Base into.
> >
> > Note: The complete path of the current directory mustn’t contain any
> > spaces or parentheses. If your working directory path does, you can do
> > another cd into the same directory, replacing every path component
> > containing spaces or parentheses with its Windows short path (that can
> > be displayed with dir /x).
> >
> > Set the EPICS host architecture EPICS_HOST_ARCH (windows-x64 for 64bit
> > builds, win32-x86 for 32bit builds).
> >
> > Run the vcvarsall.bat script of your installation (the exact path
> > depends on the type and language of installation) to set the
> > environment for your build.
> >
> > Run make (or gmake if using the version from Strawberry Perl).
> > ---------------------------------------------
> > When i cd to my folder, and typed "where cl" it doesnt' return
> > anything not even after i ran the vcvarsall.bat. I didnt' ran the
> > windows.bat because it wasn't written.
> >
> > Should i do it directly from the folder?
> >
> >
> >
> > Il 2025-04-16 13:39 Freddie Akeroyd - STFC UKRI ha scritto:
> >> Hi,
> >>
> >> In the startup directory of epics there are two bat files "win32.bat"
> >> and "windows.bat" - which did you use to setup the compiler path etc.
> >> ?
> >> win32.bat choses the compiler for 32bit builds and windows.bat for
> >> 64bit builds. Your EPICS_HOST_ARCH environment variable is set for a
> >> 64bit builds, but the error message suggests your build may be using
> >> the 32bit compiler instead as the linker cannot target x64. If you
> >> type
> >>
> >> where cl
> >>
> >> do you see a path with x64 in it like
> >>
> >> C:\Program Files\Microsoft Visual
> >>
> Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64\cl.e
> >> x
> >> e
> >>
> >> Or do you see x86 present instead?
> >>
> >> Regards,
> >>
> >> Freddie
> >>
> >>
> >>
> >> -----Original Message-----
> >> From: Federico Galdenzi <galdenzi at roma2.infn.it>
> >> Sent: 16 April 2025 08:15
> >> To: Akeroyd, Freddie (STFC,RAL,ISIS) <freddie.akeroyd at stfc.ac.uk>;
> >> Rivers <rivers at cars.uchicago.edu>
> >> Cc: tech-talk at aps.anl.gov
> >> Subject: Re: EPICS build problem
> >>
> >> Thanks in advance for the help. I made the log for make and also i
> >> can tell that i'm following by letter the tutorial that i've linked
> >> to download and build epic base. I've installed perl and make manually.
> >>
> >> Best regards.
> >>
> >>
> >>
> >> Il 2025-04-15 14:07 Freddie Akeroyd - STFC UKRI ha scritto:
> >>> Hi,
> >>>
> >>> We'll need to see a bit more of your build log to see exactly which
> >>> libraries it is having a problem with, can you please post the whole
> >>> build log by doing something like
> >>>
> >>> make clean uninstall
> >>> make > make.log 2>&1
> >>>
> >>> And posting make.log
> >>>
> >>> Thanks,
> >>>
> >>> Freddie
> >>>
> >>>> -----Original Message-----
> >>>> From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of
> >>>> Federico Galdenzi via Tech-talk
> >>>> Sent: 15 April 2025 12:36
> >>>> To: tech-talk at aps.anl.gov
> >>>> Subject: EPICS build problem
> >>>>
> >>>> Good morning all,
> >>>>
> >>>> I have a problem for installing EPICS on my machine. I've followed
> >>>> the instruction given in this site:
> >>>> https://urldefense.us/v3/__https://docs.epics-
> >>>> controls.org/en/latest/getting-started/installation-windows-
> >>>>
> plain.html__;!!G_uCfscf7eWS!a8JQwg02mRdcrkywW5dKHGcNsNeXLRf67b5
> >>>> q5862JV6Ua7PGUqoY-
> cZfs9LwLV3OMeJndOUxaevRC33Kk58OGeOCCW8$
> >>>> but it seems that i'm missing something, because i get the "make"
> >>>> fatal error
> >>>> LNK1112: module machine type 'x86' conflicts with target machine
> >>>> type 'x64'.
> >>>> I'm kinda new to this world but i cant' manage to understand what
> >>>> i'm doing wrong. It seems that i'm using 32 bit libraries on a 64
> >>>> bit environment, but i'm using Visual Studio latests kit's for
> >>>> developing in C++ in both 64 and
> >>>> 32 bit.
> >>>>
> >>>> What can i do?
- Replies:
- RE: EPICS build problem Freddie Akeroyd - STFC UKRI via Tech-talk
- Re: EPICS build problem Federico Galdenzi via Tech-talk
- References:
- EPICS build problem Federico Galdenzi via Tech-talk
- RE: EPICS build problem Freddie Akeroyd - STFC UKRI via Tech-talk
- Re: EPICS build problem Federico Galdenzi via Tech-talk
- RE: EPICS build problem Freddie Akeroyd - STFC UKRI via Tech-talk
- Re: EPICS build problem Federico Galdenzi via Tech-talk
- RE: EPICS build problem Freddie Akeroyd - STFC UKRI via Tech-talk
- Re: EPICS build problem Federico Galdenzi via Tech-talk
- Navigate by Date:
- Prev:
RE: Compile StreamDevice with PCRE on windows Freddie Akeroyd - STFC UKRI via Tech-talk
- Next:
RE: Unable to mind .lib files after successfully compiling EPICS using mingw64 Freddie Akeroyd - STFC UKRI via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
<2025>
- Navigate by Thread:
- Prev:
Re: EPICS build problem Federico Galdenzi via Tech-talk
- Next:
RE: EPICS build problem Freddie Akeroyd - STFC UKRI via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
<2025>
|