pcawte / AgDev

Port to Agon Light of TI-84-CE C/C++ Toolchain which uses LLVM and generates eZ80 ADL code
GNU Lesser General Public License v3.0
51 stars 10 forks source link

Programs containing fgetc get a linker error. #32

Closed lennart-benschop closed 2 months ago

lennart-benschop commented 2 months ago

This used to work on previous versions <2.0.0 of AgDev. When trying to link a program containing fgetc, I get the following error.

[linking] bin/ez80asm.bin /home/lennartb/AgDev/AgDev_build/meta/ld.alm [1568] macro ? [1295] :read? [14] /home/lennartb/AgDev/AgDev_build/meta/../lib/libc/fgetc.c.src [121]: extern _ungetc extern? [12] (CALM) Error: symbol ':globals._ungetc' is undefined or out of scope. make: *** [/home/lennartb/AgDev/AgDev_build/meta/makefile.mk:259: bin/ez80asm.bin] Error 2

astralaster commented 2 months ago

Can you please specify what you have done? I have tried to replicate the issue on the latest commit of ez80asm (https://github.com/envenomator/agon-ez80asm/commit/cff80543952235a7bb15233e12292491ff05731a) and it did compile without a problem using the linux release.

lennart-benschop commented 2 months ago

Just a make -f Makefile-agon for the agon-ez80asm project. The normal make will work, but that builds just a Linux binary, not one to run on the Agon.

I built the AgDev toolchain using the compile.sh script under Linux and then made sure to put the appropriate bin directory in the PATH

astralaster commented 2 months ago

I did overlook there are two Makefiles in the project, my bad. #33 Should have fixed this bug.