News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Recent posts

#21
Assembly discussions / Getting memory capacity
Last post by Vortex - January 08, 2026, 07:39:06 PM
Here is an example based on the API function GetPhysicallyInstalledSystemMemory :

include     GetMemory.inc

.data

fc1         db 'Compute name = %s'
            db 13,10,0

fc2         db 'The computer %s '
            db 'has %u Gb of memory.',0

nSize       dd 32

.data?

CompName    db 32 dup(?)
Memory      dq ?

.code

start:

    invoke  GetComputerName,\
            ADDR CompName,ADDR nSize

    invoke  printf,ADDR fc1,\
            ADDR CompName

    invoke  GetPhysicallyInstalledSystemMemory,\
            ADDR Memory

    mov     eax,DWORD PTR Memory
    mov     edx,DWORD PTR Memory+4

    mov     ecx,1024*1024
    div     ecx

    invoke  printf,ADDR fc2,ADDR CompName,eax
           
    invoke  ExitProcess,0

END start
#22
Add-ins / Re: Line Counter Add-IN
Last post by John Z - January 06, 2026, 12:12:03 PM
Updated DLL for Pelles C Version 13. Minor bug fix too.


John Z
#23
Beginner questions / Re: Read PDF text with PDFio
Last post by jos - January 05, 2026, 01:04:59 PM
Thank you very much.

Master, now it works! I'll try to go through it and compare what I missed or what I did wrong.
#24
Beginner questions / Re: Read PDF text with PDFio
Last post by TimoVJL - January 05, 2026, 09:46:05 AM
Project with only source and zlib-libs in cdecl format.

zlib project is at:
https://forum.pellesc.de/index.php?msg=41804


https://www.msweet.org/pdfio/pdfio.html
#25
Beginner questions / Re: Read PDF text with PDFio
Last post by John Z - January 04, 2026, 04:45:21 PM
Quote from: jos on January 04, 2026, 01:36:28 PMNow I only get this error:
Building pdfiodll.dll. but POLINK cannot find 'zlib.lib'?


If you have not copied the lib into the Pelles C Lib directory then it might not find it unless you add the path to the folders under Project - Options - General - Folders (select Libraries) then add the path to the zlib.lib.

John Z
#26
Beginner questions / Re: Read PDF text with PDFio
Last post by TimoVJL - January 04, 2026, 02:14:17 PM
You might find it from zlib project:
https://forum.pellesc.de/index.php?msg=41804

I haven't tested it yet.
#27
Beginner questions / Re: Read PDF text with PDFio
Last post by jos - January 04, 2026, 01:36:28 PM
Thank you gentlemen for all your help.

I have downloaded the latest zlib 1.3.1 and am getting a bit further.
Now I only get this error:
Building pdfiodll.dll. but POLINK cannot find 'zlib.lib'?

I have to wait a bit as I don't really know what I'm doing. "Just trial and error"
#28
Beginner questions / Re: Read PDF text with PDFio
Last post by TimoVJL - January 03, 2026, 08:12:46 PM
As you have a compilable project, you can try to compile it and check compiler options.
Just inform us of problems with it.
It have strange include file problems, like zlib.h, not sure, if it can be a bug.
#29
Beginner questions / Re: Read PDF text with PDFio
Last post by MrBcx - January 03, 2026, 05:58:39 PM
Quote from: jos on January 03, 2026, 03:50:45 PMWhat is POSIX and when is it used?



https://en.wikipedia.org/wiki/POSIX


AI Overview

Pelles C is primarily a Windows-focused C compiler and development kit that offers some limited or partial support for POSIX-style functions, but it is not fully POSIX-compliant.

Key points regarding POSIX and Pelles C:

    Windows Focus: Pelles C is designed for native Windows API programming. Windows APIs are not part of the POSIX standard, which defines a standard operating system interface for Unix-like systems.

    Partial POSIX Support: Pelles C has added support for some "Posix-style functions" over the years, such as the three-argument version of a function like open(). However, this support is incomplete.

    Missing Features: Users on Pelles C forums often note that key POSIX headers or functions are missing or commented out, such as unistd.h's sleep() function or important members of the
    struct dirent used for directory operations.

    make Utility: The Pelles C pomake.exe utility is noted as being "even less POSIX-complete" than the Microsoft nmake.exe, which itself is not fully POSIX-compliant.


#30
Beginner questions / Re: Read PDF text with PDFio
Last post by jos - January 03, 2026, 03:50:45 PM
Many thanks for your help,
Unfortunately I haven't gotten it to work despite your suggestions and your file? However, I feel that I have come a little further. Think I've localized a problem in my zlib.h?
Don't know if it's my version or how I placed it but I'll continue.

I keep going and it's a lot of trial and error.

In summary, it feels like pragmas for different settings are something you need to learn.
What is POSIX and when is it used?