Pelles C 12.00.2 - FAILED

Started by HIGH-Zen, January 11, 2025, 05:10:12 AM

Previous topic - Next topic

HIGH-Zen

Topic: SLRE: Super Light Regular Expression library
https://bcxbasiccoders.com/smf/index.php?topic=1043.0


Windows 11Pro 24H2
BCX Editor 3.44 (32-bit) September 23, 2022
BCX Basic 8.1.9

Files:
slre-master(Airr) from github:https://github.com/Airr/slre
slre.c
clre.h

dl2str.inc - latest and modified. Set security flags to ignore SSL errors.
(
like HttpSendRequest for "eradio.lv"
returned - error 12037
The error code 12037 is "ERROR_WINHTTP_SECURE_CERT_DATE_INVALID".
Look at comments in dl2str.inc
)

testRadio2.bas - main source file (search for radio links, *.pls and *.m3u, and write in console and in file (for AIMP player).

XXXXXXXXXXXXXXXXXXXXXXXX COMPILE: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Mingw (Nuwen) g++ (GCC) 13.1.0 - OK:
BCX BASIC to C/C++ Translator (c) 1999-2025 by Kevin Diggins
Version 8.1.9 (11/16/2024) Compiled using MS Visual C++ (194033811) for 64-bit Windows
[Lines In: 131] [Lines Out: 768] [Statements: 108] [Time: 0.03 Sec's]
BCX translated [Testradio2.Bas] to [Testradio2.C] for a C Compiler
**************************************************************************
MinGW g++ is compiling [ "C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2" ] as a 64-bit CONSOLE application.
MinGW g++ built [ "C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2".exe ]


MSVC - OK:
BCX BASIC to C/C++ Translator (c) 1999-2025 by Kevin Diggins
Version 8.1.9 (11/16/2024) Compiled using MS Visual C++ (194033811) for 64-bit Windows
[Lines In: 131] [Lines Out: 768] [Statements: 108] [Time: 0.01 Sec's]
BCX translated [Testradio2.Bas] to [Testradio2.C] for a C Compiler
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.6.2
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
**************************************************************************
MSVC is compiling [ "C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2" ] as a 64-bit CONSOLE application.
testRadio2.c
C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT>REM @CALL C:\VS2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\Hostx64\x64\\cl.exe  /std:c++20 /permissive /c /O2 /Gd /W2 /MD -D NTDDI_VERSION=0x0A000000 -D_WIN32_WINNT=0x0A000000 /EHsc /Tp "C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2".c
Linking "C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2"
Microsoft (R) Incremental Linker Version 14.36.32532.0
Copyright (C) Microsoft Corporation.  All rights reserved.
Creating library C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2.lib and object C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2.exp
Completed
MSVC built [ "C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2".exe ]
Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32532 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.


Pelles C 12.00.2 - FAILED:
BCX BASIC to C/C++ Translator (c) 1999-2025 by Kevin Diggins
Version 8.1.9 (11/16/2024) Compiled using MS Visual C++ (194033811) for 64-bit Windows
[Lines In: 131] [Lines Out: 768] [Statements: 108] [Time: 0.02 Sec's]
BCX translated [Testradio2.Bas] to [Testradio2.C] for a C Compiler
**************************************************************************
Pelles C is compiling [ "C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2".c ] as a 64-bit CONSOLE application.
C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2.c(324): error #2119: Redeclaration of 'DownloadToStr', previously declared at C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2.c(287).
C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2.c(543): error #2119: Redeclaration of 'DownloadToStr', previously declared at C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2.c(324).
C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2.c(644): error #2123: Redefinition of 'DownloadToStr', previously defined at C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2.c(543).
C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2.c(644): error #2119: Redeclaration of 'DownloadToStr', previously declared at C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2.c(543).
POLINK: fatal error: File not found: 'C:\Users\andre\Downloads\slre_regex_bcx\slre-master(Airr)-test-AP\EXPORT\testRadio2.obj'.

Tested with BCX 8.2.0 too. Same results.

MrBcx

DownloadToStr became a built-in BCX keyword in version 8.1.7 and differs in
its argument list from the version inside dl2str.inc

Change the name to SUB Old_DownloadToStr and the call to Old_DownloadToStr
and it will compile and run using Pelles C and Lcc-Win32


The reason why it compiles unchanged using the C++ compilers is because the C++ compilers
see your DownloadToStr and the BCX built-in DownloadToStr as valid overloaded functions.

HIGH-Zen

Thank You for quick reply  :)
I changed DownloadToStr name in dl2str.inc and in .bas source file to DownloadHtmlToStr and now it is fixed.
I am happy now!