I use 32 bit windows and my assistant has 64 bit. We both use gcc (I specifically use tdm-gcc. My assistant uses qt which also uses gcc as far as I'm aware). I wanted to write a very simple plugin in a form of simple .dll
for my assistant to use from inside of her application. To do so I need just to compile my .dll
for windows 32 (like 32 bit XP) as a .dll
for a windows 64 (like win 7 or 10).
I found that -m64
option could work. However when I compile it and she links it and tries to call my functions it shows that this application with this plugin .dll
I've made (on 32 bit windows with tdm-gcc with that -m64
option) silently crashes (program ends and no output is generated).
What is the problem with that? The test we were doing was simple like exporting a function that just returns 232323
and trying to receive and print it on application side - but is still doesn't work.My guess is that this 64 bit .dll
is wrong (dependency walker shows dependency on kernel32, isn't it 32 bit specific?)
Should I do something more than putting -m64
to make my plugin compile to 64 bit and work properly there?
It showed it most probably work.. She cant link it in QT from unknown reasons to me (we work remotely and i cannot check) but she succesfully linked it dynamically so it seems -m64 in fact suffice