can i make the cobol to C translation (cobc -C) on a platform (suppose Linux), move the C source on the target machine (suppose Win, o some other linux), then compile and link the C code on each target?
You seem to have CSS turned off.
Please don't fill out this field.
You can, as long as:
We had to decide this in our COBOL team, too, and skipped the idea. Reasons:
What we do now is the following:
Works like a charm :-)
thanks. Can I please suggest me some way, or let me find some guide to build GC on a WIN machine? As you probabily guess, the C world is still a bit exhoteric for me...
What timing. ;-)
I just bragged about Simon's recent efforts on LinkedIn. There is the first official nightly build for Windows native, Visual Studio, mentioned at
and in the FAQ under, http://opencobol.add1tocobol.com/gnucobol/#are-there-pre-built-gnu-cobol-packages entry 1.5.4
I'm pretty sure this is going to be a huge boon for GNU Cobol.
@Massimo: Depends highly on the compiler you want to use on Windows, there's the VC option (see FAQ entry), the GCC via MinGW option (see build guide on https://sourceforge.net/p/open-cobol/wiki/Gary%20Cutler%20Files/ - didn't checked yet but should work without patches with GC nightly tarball as well), the not-real-option GCC via Cygwin (very easy to set up, download the prerequisites via cygwin setup and do the rest "the unix way") and of course: any other compiler, if possible use an IDE like VC [integration available at least for ICC and clang] or Code::Blocks (supports nearly all compilers on Windows and imports the VC solutions) if you don't want to use your own compilers makefile.
@Brian: please remove the vc12 references from the FAQ entry - as I've said: there is no need for a quote just kick out this information as it's not useful "standalone".
... please remove the vc12 references ...
... please remove the vc12 references ...
I'm already using the last 2.0 pre-built package on Windows. I guess this version uses the standard ISAM file handler http://sourceforge.net/projects/vbisam/ , am I right ?
I'd like to make some tests on win with the Berkeley DB: I understood you have to select the file system at GC build time, so I need to build GC on win with the Berkeley option...is it correct ?
...the previous post was mine, I forgot to log in.
Here are the steps (untested):
I suggest to not use the zip file linked for getting BDB but to get it from Oracle and build it from source, too.
thank you very much, you're so kind.
thanks to Simon suggestion I've been successful obtaining a GC 2.0 win32 via Micorosof VS 2010 :):):)
my 2.0 built out of the 2.0 branch reads 2.0.20140120, while the win binary download is 2.0.20140821
so, how can I find and download the patches to move my version to the "last" one?
(pardon, I'm new to SVN also -- there's a lot to learn)
You have the latest version (BTW: with own build BDB?) if you did a svn checkout.
I've just didn't uploaded tarstamp.h which is included in build_win as version number yet.
This will change someday to the revision number, along with changes to the version informations (seen in file->properties for cobc/cobcrun/libcob) and cobc/cobcrun --version - one of the changes here that are "started but unfinished work".
BDB still to be implemented...I'll try soon.
BTW, with this build the "add 1 to.." bug is back: https://sourceforge.net/p/open-cobol/discussion/help/thread/5c72f053/
The bug was fixed by your upload of win binaries some days ago: how can I get the source(s) for this patch?
... MPIR is fun (or GC's usage of it ;-)
I've did not applied any patch, just rebuild MPIR 2.6.0 with vc11 and used the gmp.h+mpir.lib+mpir.dll from these to rebuild the former version of GC. All the mpir files used are in the win_prerequisites. If you've used them it could be worth to get MPIR 2.6.0 and rebuild it with VS2010 (vc10 btw). Everything is included in the mpir download to build with vc10 (get the download from their website, build the dll project that suits you most and copy the binaries to your GC build_windows).
I'm already using the mpir files from the win_prerequisites.
I got the mpir download, recompiled the project:
gmp.h are identical, both in the GC and in the mpir project
mpir.lib and mpir.dll appear to be different
so, should I now rebuild GC with the "new" mpir.lib, and put the "new" mpir.dll in my GC runtime dir ?
It's normal that these are different as you compile with another VC version. Yes, use the same build versions (depending on which mpir project you've compiled you have a processor specific version and in any case not a dependency to vc11 runtime [at least not in mpir.dll]).
In any case there seems to be a bug in GC (is in from the beginning) as it's get's some memory allocations for mpir/gmp via mpir/gmp function and doesn't use mpir/gmp functions for freeing the memory.
Therefore the new version may still not work :-(
Philipp is currently solving this ticket [bugs:#91], if your self-build version doesn't work wait until the ticket is closed, do an svn update of GC and rebuild it afterwards. I'll do the same for the binary package, too.
got it. In the meanwhile, I'll have some fun with GTK !
So bug is solved, I guess you may got a svn update, build your package again (with/without BDB) and tried again?
got the r413, it seems perfect. Thanks everybody.
Sign up for the SourceForge newsletter: