Mingw GCC Undefined references to LIB EFI
Posted: Wed Dec 13, 2023 5:57 am
For the past couple days I've been trying to get Mingw GCC Working with GNU-EFI, Whenever I try to compile using function from libefi.h I get errors:
This is my Makefile
Code: Select all
/usr/lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/ccUyeC4u.o:main.c:(.text+0x1c): undefined reference to `InitializeLib'
/usr/lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld: /tmp/ccUyeC4u.o:main.c:(.text+0x2b): undefined reference to `Print'
Code: Select all
gcc:
x86_64-w64-mingw32-gcc main.c \
-std=c17 \
-Wall \
-Wpedantic \
-mno-red-zone \
-ffreestanding \
-nostdlib \
-I /usr/include/efi \
-I /usr/include/efi/x86_64 \
-L /usr/lib
-Wl,--subsystem,10 \
-e efi_main \
-o main.efi