Pelles C forum

Pelles C => Bug reports => Topic started by: Vortex on May 03, 2026, 11:34:41 AM

Title: Undefined label issue
Post by: Vortex on May 03, 2026, 11:34:41 AM
Poasm Version 14.10.0 reports an error message while assembling the code below :

.386
.model flat,stdcall
option casemap:none

.code

    call    main
    ret

main PROC

    mov     eax,OFFSET sample
    ret

main ENDP

sample:

    db      'This is a test.',0

END

\PellesC\bin\poasm.exe /AIA32 sample.asm
sample.asm(12): error: Symbol 'sample' is undefined.
sample.asm(12): error: Symbol 'main.sample' is undefined.

This issue happens when a label is defined after a procedure.

Title: Re: Undefined label issue
Post by: Pelle on May 03, 2026, 09:26:37 PM
IMO, this is a bit like asking for trouble.
I may do something about it some day, but I will be in no hurry to do so...
Title: Re: Undefined label issue
Post by: Vortex on May 03, 2026, 10:36:22 PM
Hi Pelle,

Many thanks.