我视乎找到答案了, 这只是IDE 的一个 bug.
Only after posting this question I checked and saw that compiling on a 64 bit machine with g++ automatically produces a 64 bit library. Running the file command (file name_of_the_program.exe) tells me that the application is 32 bit but if I test the running process I see that it is 64 bit. Therefore it seems that I don't actually have a problem. Despite compiling for 32 bit, the running app runs as 64 bit app.