FW: converting windows source to gcc
Mo McKinlay
mmckinlay@labs.interopen.org
Wed Apr 12 18:33:00 GMT 2000
# > Hi, I am a new user of gnu, running under Solaris. I have written a simple
# > program in windows (compiled using Borland C++ Builder 5) which compiles
# > and runs correctly. I transferred the file to our Sun workstation and
# > tried to compile it using our newly set up gnu compiler (command used is
# > "gcc nonul.c"). I am getting heaps of errors that didn't exist in my
# > windows program. I have a feeling that some of the errors are to do with
# > the file format, ie carriage returns or linefeeds or something.
You are correct in thinking that it is a problem with CR/LF conversions.
I've attached the source to a *very* simple (and crude) DOS -> UNIX
converter, as well as converted sources for your program.
To use the converter, just do:
dos2unix < infile.c > outfile.c
Although you may already have a similar program installed (most likely
under the name 'dos2unix', or possibly 'duconv'). If you do, I suggest you
use that instead, as it'll be much more well written :-)
Hope this helps,
Mo.
--
Mo McKinlay Chief Software Architect inter/open Labs
mmckinlay (at) labs.interopen.org http://www.interopen.org
mmckinlay (at) gnu.org http://www.gnu.org
More information about the Gcc-bugs
mailing list