PDA

View Full Version : Compiling libcod_win



ineedbots
3rd December 2020, 18:47
Hi all,

I am trying to compile https://github.com/M-itch/libcod_win using codeblocks (MingW GCC). However I am having some issues with it. First of all, I am getting
C:\Users\Built\AppData\Local\Temp\cctoM4yb.s|509|E rror: operand type mismatch for `jmp'|

When I comment out (just to see what other errors I could be getting) https://github.com/M-itch/libcod_win/blob/master/libcod_win/src/restore_entry_functions.cpp#L138 I get
E:\SteamLibrary\steamapps\common\Call of Duty Modern Warfare 2\stuff\sources\libcod_win\libcod_win\src\gsc_mysq l.cpp|38|undefined reference to `mysql_init'|


I also needed to add the '-fpermissive' compiler flag as I was getting
E:\SteamLibrary\steamapps\common\Call of Duty Modern Warfare 2\stuff\sources\libcod_win\libcod_win\src\gsc.cpp| 403|error: cast from 'void*' to 'int' loses precision [-fpermissive]|


All I did was clone the repo, open with codeblocks and tried building it. What is going on here? How can I compile this? Thanks

ineedbots
5th December 2020, 00:02
omg Okay, I found out that the MingW that comes with codeblocks is 64bit, I got it working just fine once I used mingw32

Mitch
5th December 2020, 07:51
A 64-bit compiler doesn't work, because CoD and the mysql dll are both 32-bit.
Therefore the weird errors.