When using the BCX BASIC to C translator .exe compiled with either Pelle's C Version 6.50, Release Candidate #1 or Pelle's C Version 6.50, Release Candidate #2, most of the lines in the C file output by the BCX translator contain a double CR/LF, that is, 0D0A0D0A instead of 0D0A.
This problem does not occur when the BCX translator is compiled with the Microsoft C/C++ compiler.
Robert Wishlaw
This version can compile SQLite 3.7.3 amalgamation version.
Good work Pelle !
Quote from: Pelle on October 27, 2010, 03:18:13 PM
Robert, MrBCX regarding double CR/LF:
I don't know much about the BCX translator, nor how to use it. I'm not terribly interested in going through a big auto-translated C file to find a *possible* bug (it could be anything, at this point). Can you boil down the problem to a C file of a more manageble size?
Pelle,
BCX uses simple disk i/o as you'll see in the samples from the generated BCX source code below.
The first 36 lines are emitted correctly -
only one crlf// *********************************************************************
// Created with BCX32 - BASIC To C/C++ Translator (V) 6.2.2 (2010/10/24)
// BCX (c) 1999 - 2009 by Kevin Diggins
// *********************************************************************
// Translated for compiling with a C Compiler
// *********************************************************************
#define WIN32_LEAN_AND_MEAN // limits reading seldom used header files
#include <windows.h> // Win32 Header File
#include <windowsx.h> // Win32 Header File
#include <commctrl.h> // Win32 Header File
#include <commdlg.h> // Win32 Header File
#include <mmsystem.h> // Win32 Header File
#include <shellapi.h> // Win32 Header File
#include <shlobj.h> // Win32 Header File
#include <richedit.h> // Win32 Header File
#include <wchar.h> // Win32 Header File
#include <objbase.h> // Win32 Header File
#include <ocidl.h> // Win32 Header File
#include <winuser.h> // Win32 Header File
#include <olectl.h> // Win32 Header File
#include <oaidl.h> // Win32 Header File
#include <ole2.h> // Win32 Header File
#include <oleauto.h> // Win32 Header File
#include <conio.h>
#include <direct.h>
#include <ctype.h>
#include <io.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
#include <setjmp.h>
#include <time.h>
#include <stdarg.h>
#include <process.h>
// *************************************************
These are the BCX statements that emit the includes above fprintf(Outfile,"%s\n","// *********************************************************************");
fprintf(Outfile,"%s%s\n","// Created with BCX32 - BASIC To C/C++ Translator (V) ",Version);
fprintf(Outfile,"%s\n","// BCX (c) 1999 - 2009 by Kevin Diggins");
fprintf(Outfile,"%s\n","// *********************************************************************");
fprintf(Outfile,"%s\n","#include <windows.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <windowsx.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <commctrl.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <commdlg.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <mmsystem.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <shellapi.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <shlobj.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <richedit.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <wchar.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <objbase.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <ocidl.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <winuser.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <olectl.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <oaidl.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <ole2.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <oleauto.h> // Win32 Header File ");
fprintf(Outfile,"%s\n","#include <conio.h>");
fprintf(Outfile,"%s\n","#include <direct.h>");
fprintf(Outfile,"%s\n","#include <ctype.h>");
fprintf(Outfile,"%s\n","#include <io.h>");
fprintf(Outfile,"%s\n","#include <math.h>");
fprintf(Outfile,"%s\n","#include <stdio.h>");
fprintf(Outfile,"%s\n","#include <string.h>");
fprintf(Outfile,"%s\n","#include <stddef.h>");
fprintf(Outfile,"%s\n","#include <stdlib.h>");
fprintf(Outfile,"%s\n","#include <setjmp.h>");
fprintf(Outfile,"%s\n","#include <time.h>");
fprintf(Outfile,"%s\n","#include <stdarg.h>");
fprintf(Outfile,"%s\n","#include <process.h>");
fprintf(Outfile,"%s\n","");
The remaining 40,000+ lines are emitted incorrectly -- two crlfNothing special ... just lots more fprint statements.
fprintf(Outfile,"%s\n","// END BCXRTHEADER\n\n");
fprintf(Outfile,"%s\n","");
fprintf(Outfile,"%s\n","int main(int argc, char *argv[])");
This problem does not exist when compiled with Pelles C 6.00 or earlier, MSVC 8.0, Lcc-Win32, or Borland's Bcc55.
If you type something in source file and then close IDE - the file is saved without prompt.
If you close only the tab with source file, but not IDE - the prompt to save changes appears.
It's a bit dangerous to save without prompting :)
Only recently discovered Pelles C, and have been doing some testing with RC2, all going well. However there seems to be missing a header file - If I include <emmintrin.h> or <xmmintrin.h>, compile gives warning - "Can't find include file <mmintrin.h>". Have checked, and file doesn't appear to have be installed.
Thanks.
Hey I downloaded a new version of pelle C and it does not want to compile my programs the error is : fatal error #1035: Can't find include file <stdio.h> how do I fix this.