News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Recent posts

#61
Beginner questions / Re: Error #2158 Unrecognized t...
Last post by Jerry - November 12, 2025, 10:43:11 PM
Quote from: John Z on November 12, 2025, 05:51:51 PMJerry,

If you are using the IDE check the box in the picture.  This will add /Go to the compile
flags (CFLAGS).

John Z
Thank you, John and TimoVJL! The problem is solved!
#62
Assembly discussions / Re: Rich Edit sample
Last post by Vortex - November 12, 2025, 08:50:50 PM
Here is the 64-bit version :

include DlgBox.inc

.data

Dlgbox db 'MyDlg',0

.code

start PROC PARMAREA=5*SIZEOF QWORD

LOCAL hModule:QWORD

    mov     rax,RichEditANSIWndProc
    invoke  GetModuleHandle,0
    mov     hModule,rax
    invoke  DialogBoxParam,hModule,ADDR Dlgbox,0,ADDR DlgProc,0
    invoke  ExitProcess,rax

start ENDP

DlgProc PROC hWnd:QWORD,uMsg:QWORD,wParam:QWORD,lParam:QWORD PARMAREA=4*SIZEOF QWORD

    .IF uMsg==WM_CLOSE

        invoke  EndDialog,hWnd,0

    .ELSE

        xor    rax,rax
        ret

    .ENDIF

    mov    eax,1
    ret

DlgProc ENDP

END start
#63
Beginner questions / Re: Error #2158 Unrecognized t...
Last post by John Z - November 12, 2025, 05:51:51 PM
Jerry,

If you are using the IDE check the box in the picture.  This will add /Go to the compile
flags (CFLAGS).

John Z
#64
Beginner questions / Re: Error #2158 Unrecognized t...
Last post by TimoVJL - November 12, 2025, 04:32:30 PM
Not a bug.
Don't add that code example.

Just add -Go to pocc commandline, if you don't use poide or add in poide compiler options Define compatbility names
#65
Beginner questions / Re: Error #2158 Unrecognized t...
Last post by Jerry - November 12, 2025, 04:26:52 PM
Quote from: TimoVJL on November 11, 2025, 08:20:13 PM
Quote/Go Accepts 'old' names for C runtime functions.
#ifndef _SSIZE_T_DEFINED
#define _SSIZE_T_DEFINED
typedef __SSIZE_TYPE__ _ssize_t;
#ifdef __POCC__OLDNAMES
typedef __SSIZE_TYPE__ ssize_t;
#endif /* __POCC__OLDNAMES */
#endif /* SSIZE_T_DEFINED */

Thank you for the suggestion. But the problem persists even after adding the lines to my code.
I think this might be a bug with Pelles C (current version 13.00), as other compilers work fine with my code.
#66
Beginner questions / Re: Pomake incompatibility
Last post by John Z - November 12, 2025, 04:15:41 PM
Quote from: TimoVJL on November 12, 2025, 03:15:54 PMPOMAKE: example2.mak(9): warning: The system cannot read from the specified device.You also forgot CR/LF from last line.


Actually not forgotten, there are two in there.  Attached files -
-----------------
italofutura - I don't understand your question - sorry

John Z
#67
Beginner questions / Re: Pomake incompatibility
Last post by TimoVJL - November 12, 2025, 04:15:10 PM
From help file
QuoteSyntax Description
%s    The complete filename.
%|{parts}F    The {parts} specification can be zero or more of the following letters:
  d Drive
  p Path
  f Base name
  e Extension
%% A literal %.

 

For example, the the full filename is specified by %|F or by %|dpfeF, as well as by %s.

 

#68
Beginner questions / Re: Pomake incompatibility
Last post by italofutura - November 12, 2025, 03:23:45 PM
You are right, HLA was in the path.

Given the opportunity, do you know how the "fileparts", the microsoft way %|p,d,e,fF is supposed to work?

The PellesC extension e.g. $(@D) works flawlessly.
#69
Beginner questions / Re: Pomake incompatibility
Last post by TimoVJL - November 12, 2025, 03:15:54 PM
POMAKE: example2.mak(9): warning: The system cannot read from the specified device.You also forgot CR/LF from last line.
#70
Beginner questions / Re: Pomake incompatibility
Last post by John Z - November 12, 2025, 01:35:56 PM
Hi italofutura,

Are you sure you are using version 13?  It seems you are using a very old version.
Even look at copyright you provided 2004 - new version copyright 13.0.0 is 2025 -

Perhaps version 13 was not fully installed for some reason.

Below are screen shots of pomake.exe details in Pelles C v13.

John Z

ALSO notice that the example provided by TimoVJL shows pomake version 13.0.0
I believe the '10' he mentions is the WINDOWS version -

results on Windows 11 - testing pomake v10-v13
Windows 11
-------
# Sample makefile

all: file2.obj file1.obj

file2.obj: file2.c
        type $*.c

file1.obj: file1.c
        type $*.c
-------
PATH=C:\Program Files\PellesC_V10\Bin
c:\POMAKE>pomake -f example2.mak
        type file2.c
// file 2
int k;
        type file1.c
// file1
int k;
-------
PATH=C:\Program Files\PellesC_V11\Bin
c:\POMAKE>pomake -f example2.mak
POMAKE: example2.mak(9): warning: The system cannot read from the specified device.
        type file2.c
// file 2
int k;
        type file1.c
// file1
int k;
-------
PATH=C:\Program Files\PellesC_V12\Bin
c:\POMAKE>pomake -f example2.mak
POMAKE: example2.mak(9): warning: The system cannot read from the specified device.
        type file2.c
// file 2
int k;
        type file1.c
// file1
int k;
-------
PATH=C:\Program Files\PellesC_V13\Bin
c:\POMAKE>pomake -f example2.mak
POMAKE: example2.mak(9): warning: The system cannot read from the specified device.
        type file2.c
// file 2
int k;
        type file1.c
// file1
int k;
-------