1

I am looking to develop a d3d11 app with gcc from tdm-gcc(tried pure MinGW didn't work), I've written test app, but am unable to link libd3d11 in order to get D3D11CreateDeviceAndSwapChain@48 The app is supposed to be compileable in both 32-bit and 64-bit respectively. Here's how I compile trying to use mingw headers and libs:

gcc -m32 -ld3d11 main.c -o test.exe

I am getting:

C:/MinGW/64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\TEMP\ccvsC3nh.o:main.c:(.text+0x243): undefined reference to `D3D11CreateDeviceAndSwapChain@48'
collect2.exe: error: ld returned 1 exit status

I've seen some posts about compiling directx via mingw, but they didn't give sufficient info, as I am not exactly sure what I am missing or doing wrong.

0 Answers0