I had no issues when I downloaded to my local machine’s c:\ drive. I integrated with Notepad++ and it all worked perfectly! No issues running gnuCOBOL on a local drive (i.e. c:).
However, for work, I use Horizon VMWare as my virtual PC. The VMWare image includes a mapped network drive to allow me to store utilities, programs, documents, etc. Anything written to the C:\ will be lost when I sign out. I downloaded GnuCOBOL 3.2 (28Jul2023) MSYS2 64-bit GC32M-BDB-x64.7z -- MSYS2 64-bit GnuCOBOL 3.2 Final release with full debugging support to my mapped drive “O:”. No spaces in path. When I run cobc from my mapped network drive I’m getting errors. I suspect it has something to do with the path or path length. Does anyone know if this can be resolved and if so, how?
O: is a mapped network drive - //xxx-smb/xxx_home/PBaker
I think that's not understood by the cmd envrionment where this runs.
I've used to use network drives and it worked fine if starting using set_env,cmd directly from the network (which will assign a temporary drive, commonly Z: and map accordingly). Can you please recheck that?
open //xxx-smb/xxx_home/PBaker/Utilities/gnuCOBOL/set_env.cmd --> from explorer.exe or "Run
execute cd O:\COBOL\samples
execute cobc -x simple.cob -o a.exe (no additional set_env call from the command line)
If this doesn't work, then please compile with cobc -x simple.cob -o a.exe -vv and share the output.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the quick response. I very much appreciate it. I followed the steps above (basically it was what I had been doing). It did not work. Below is the output using the -vv option. Thank you!
CD:O:\COBOL\samples\simple.cobCurrentdirectory:O:\COBOL\sampleso:\utilities\gnuCobol\set_env.cmdProcessstarted(PID=11144)>>>cobc(GnuCOBOL)3.2.0Copyright(C)2023FreeSoftwareFoundation,Inc.LicenseGPLv3+:GNUGPLversion3orlater<https://gnu.org/licenses/gpl.html>Thisisfreesoftware;seethesourceforcopyingconditions.ThereisNOwarranty;notevenforMERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.WrittenbyKeisukeNishida,RogerWhile,RonNorman,SimonSobisch,EdwardHartBuiltJul28202316:08:08PackagedJul28202316:58:47UTCCversion(MinGW)"13.1.0"GnuCOBOL3.2.0(Jul28202316:07:51),(MinGW)"13.1.0"GMP6.2.1,libxml22.11.4,cJSON1.7.15,PDCursesMod4.3.7,BDB18.1.40O:\COBOL\samples>cobc-xsimple.cob-oa.exe-vvcobc-xsimple.cob-oa.exe-vvloadingstandardconfigurationfile'default.conf'commandline:cobc-x-oa.exe-vvsimple.cobpreprocessing:simple.cob->C:\Users\PBaker\AppData\Local\Temp\cob7372_0.cobreturnstatus:0parsing:C:\Users\PBaker\AppData\Local\Temp\cob7372_0.cob(simple.cob)returnstatus:0translating:C:\Users\PBaker\AppData\Local\Temp\cob7372_0.cob->C:\Users\PBaker\AppData\Local\Temp\cob7372_0.c(simple.cob)executing:gcc-c-I"o:\Utilities\gnuCOBOL\include"-v-o"C:\Users\PBaker\AppData\Local\Temp\cob7372_0.o""C:\Users\PBaker\AppData\Local\Temp\cob7372_0.c"Usingbuilt-inspecs.COLLECT_GCC=gccTarget:x86_64-w64-mingw32Configuredwith:../gcc-13.1.0/configure--prefix=/mingw64--with-local-prefix=/mingw64/local--build=x86_64-w64-mingw32--host=x86_64-w64-mingw32--target=x86_64-w64-mingw32--with-native-system-header-dir=/mingw64/include--libexecdir=/mingw64/lib--enable-bootstrap--enable-checking=release--with-arch=nocona--with-tune=generic--enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit--enable-shared--enable-static--enable-libatomic--enable-threads=posix--enable-graphite--enable-fully-dynamic-string--enable-libstdcxx-filesystem-ts--enable-libstdcxx-time--disable-libstdcxx-pch--enable-lto--enable-libgomp--disable-libssp--disable-multilib--disable-rpath--disable-win32-registry--disable-nls--disable-werror--disable-symvers--with-libiconv--with-system-zlib--with-gmp=/mingw64--with-mpfr=/mingw64--with-mpc=/mingw64--with-isl=/mingw64--with-pkgversion='Rev7, Built by MSYS2 project'--with-bugurl=https://github.com/msys2/MINGW-packages/issues--with-gnu-as--with-gnu-ld--disable-libstdcxx-debug--with-boot-ldflags=-static-libstdc++--with-stage1-ldflags=-static-libstdc++Threadmodel:posixSupportedLTOcompressionalgorithms:zlibzstdgccversion13.1.0(Rev7,BuiltbyMSYS2project)COLLECT_GCC_OPTIONS='-c''-I''o:\Utilities\gnuCOBOL\include''-v''-o''C:\Users\PBaker\AppData\Local\Temp\cob7372_0.o''-mtune=generic''-march=nocona''-dumpdir''C:\Users\PBaker\AppData\Local\Temp\'//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/cc1.exe-quiet-v-Io:\Utilities\gnuCOBOL\include-iprefix//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/-D_REENTRANTC:\Users\PBaker\AppData\Local\Temp\cob7372_0.c-quiet-dumpdirC:\Users\PBaker\AppData\Local\Temp\-dumpbasecob7372_0.c-dumpbase-ext.c-mtune=generic-march=nocona-version-oC:\Users\PBaker\AppData\Local\Temp\ccu96YQx.sGNUC17(Rev7,BuiltbyMSYS2project)version13.1.0(x86_64-w64-mingw32)compiledbyGNUCversion13.1.0,GMPversion6.2.1,MPFRversion4.2.0-p9,MPCversion1.3.1,islversionisl-0.26-GMPGGCheuristics:--paramggc-min-expand=100--paramggc-min-heapsize=131072ignoringnonexistentdirectory"//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/include"ignoringduplicatedirectory"//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.0/include"ignoringnonexistentdirectory"D:/a/msys64/mingw64/include"ignoringnonexistentdirectory"/mingw64/include"ignoringduplicatedirectory"//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed"ignoringnonexistentdirectory"//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/include"ignoringnonexistentdirectory"D:/a/msys64/mingw64/include"ignoringduplicatedirectory"o:\Utilities\gnuCOBOL\include"asitisanon-systemdirectorythatduplicatesasystemdirectory#include "..." search starts here:#include <...> search starts here://xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../include//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixedEndofsearchlist.Compilerexecutablechecksum:79cd6bb259be143c9b3acca47f926a3fCOLLECT_GCC_OPTIONS='-c''-I''o:\Utilities\gnuCOBOL\include''-v''-o''C:\Users\PBaker\AppData\Local\Temp\cob7372_0.o''-mtune=generic''-march=nocona''-dumpdir''C:\Users\PBaker\AppData\Local\Temp\'as-v-Io:\Utilities\gnuCOBOL\include-oC:\Users\PBaker\AppData\Local\Temp\cob7372_0.oC:\Users\PBaker\AppData\Local\Temp\ccu96YQx.sGNUassemblerversion2.40(x86_64-w64-mingw32)usingBFDversion(GNUBinutils)2.40COMPILER_PATH=//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/;//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/LIBRARY_PATH=//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/;//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/;//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/;//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../COLLECT_GCC_OPTIONS='-c''-I''o:\Utilities\gnuCOBOL\include''-v''-o''C:\Users\PBaker\AppData\Local\Temp\cob7372_0.o''-mtune=generic''-march=nocona''-dumpdir''C:\Users\PBaker\AppData\Local\Temp\cob7372_0.'returnstatus:0executing:gcc-Wl,--export-all-symbols-Wl,--enable-auto-import-Wl,--enable-auto-image-base-o"a.exe""C:\Users\PBaker\AppData\Local\Temp\cob7372_0.o"-L"o:\Utilities\gnuCOBOL\lib"-L/mingw64/lib-lcobo:\Utilities\gnuCOBOL\bin/ld.exe:cannotfind//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/crt2.o:Invalidargumento:\Utilities\gnuCOBOL\bin/ld.exe:cannotfind//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtbegin.o:Invalidargumento:\Utilities\gnuCOBOL\bin/ld.exe:cannotfind-lgcc:Nosuchfileordirectoryo:\Utilities\gnuCOBOL\bin/ld.exe:cannotfind-lgcc_eh:Nosuchfileordirectoryo:\Utilities\gnuCOBOL\bin/ld.exe:cannotfind-lgcc:Nosuchfileordirectoryo:\Utilities\gnuCOBOL\bin/ld.exe:cannotfind-lgcc_eh:Nosuchfileordirectoryo:\Utilities\gnuCOBOL\bin/ld.exe:cannotfind//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/default-manifest.o:Invalidargumento:\Utilities\gnuCOBOL\bin/ld.exe:cannotfind//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtend.o:Invalidargumentcollect2.exe:error:ldreturned1exitstatusreturnstatus:1cobc(GnuCOBOL)3.2.0BuiltJul28202316:08:08PackagedJul28202316:58:47UTCCversion(MinGW)"13.1.0"O:\COBOL\samples>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I got the 3.2 gnuCOBOL prebuilt binaries from: https://www.arnoldtrembley.com/GnuCOBOL.htm
I had no issues when I downloaded to my local machine’s c:\ drive. I integrated with Notepad++ and it all worked perfectly! No issues running gnuCOBOL on a local drive (i.e. c:).
However, for work, I use Horizon VMWare as my virtual PC. The VMWare image includes a mapped network drive to allow me to store utilities, programs, documents, etc. Anything written to the C:\ will be lost when I sign out. I downloaded GnuCOBOL 3.2 (28Jul2023) MSYS2 64-bit GC32M-BDB-x64.7z -- MSYS2 64-bit GnuCOBOL 3.2 Final release with full debugging support to my mapped drive “O:”. No spaces in path. When I run cobc from my mapped network drive I’m getting errors. I suspect it has something to do with the path or path length. Does anyone know if this can be resolved and if so, how?
O: is a mapped network drive - //xxx-smb/xxx_home/PBaker
Thanks in advance….
Last edit: Paul 2024-03-20
I think that's not understood by the cmd envrionment where this runs.
I've used to use network drives and it worked fine if starting using set_env,cmd directly from the network (which will assign a temporary drive, commonly Z: and map accordingly). Can you please recheck that?
cd O:\COBOL\samplescobc -x simple.cob -o a.exe(no additional set_env call from the command line)If this doesn't work, then please compile with
cobc -x simple.cob -o a.exe -vvand share the output.Thank you for the quick response. I very much appreciate it. I followed the steps above (basically it was what I had been doing). It did not work. Below is the output using the -vv option. Thank you!