marcelogdeandrade / PythonCompiler

Code used on "Writing your own programming language and compiler with Python" post
GNU General Public License v3.0
234 stars 53 forks source link

Strange answer of print #3

Closed AlexisHuvier closed 4 years ago

AlexisHuvier commented 5 years ago

Hey, i have the same code. I compile with clang but the executable say "-458475770" for this code : print(4 + 4 - 2);

aditya9126 commented 5 years ago

1>try using visual studio 2> replace "utf-8" in codegen code to "latin1"

all the best!!!

AlexisHuvier commented 4 years ago

I remake the code but i have this error : D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file .\output.obj' is incompatible with i386:x86-64 output .\output.obj:(.text+0x8): undefined reference to_printf' D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x2e): undefined reference to `WinMain' collect2.exe: error: ld returned 1 exit status