根据构建日志,似乎资源是以64位模式构建的( ld.exe: i386:x86-64 architecture of input file '..\Files\User\resources.res' ),但你正在编译32位的可执行文件(“ -m32 “选项”。然后由于不匹配,它们无法将两者连接在一起。
ld.exe: i386:x86-64 architecture of input file '..\Files\User\resources.res'
-m32
假设dll是64位,尝试将编译器切换到64位(使用“-m64”标志,不确定如何在CodeBlocks中切换它)。否则你必须将windres切换到32位(可能是“--target = pe-i386”,见这里: TDM-GCC w64脚本改变32bit的windres? )。