Problems building Windows target

Snader

Member
Joined
May 7, 2020
Messages
21
Well, back again and actually trying to build something for Windows for the first time.. but it is giving me headaches. Everything seems fine and can't pinpoint where the problem is. I have looked all over the forum,but nothing seems to help.

mingw32-make: *** [build/Debug32/main.o] Error 1
Makefile:59: recipe for target 'build/Debug32/main.o' failed
TRANS FAILED: Error executing 'mingw32-make ARCH="32" CCOPTS=" -m32 -O0" LDOPTS=" -m32 -LD:/Development/Cerberus/libs/Win32" LIBOPTS=" -lopenal32" SRCOPTS=" " VPATHOPTS=" " OUT="Debug32/CerberusGame"', return code=2
Abnormal program termination.
Exit code: -1

I am finally getting my Penguin game ready for steam, but this problem keeps me left with HTML5 only at the moment..
 
Last edited:

dawlane

Well-known member
CX Code Contributor
Tutorial Author
Joined
Jun 21, 2017
Messages
1,040
Which version of MinGW are you trying to use?
 

dawlane

Well-known member
CX Code Contributor
Tutorial Author
Joined
Jun 21, 2017
Messages
1,040
Try building as a 64 bit executable and not as a 32 bit one.
You'd find building with Visual Studio to be more reliable than using MinGW.
 

Snader

Member
Joined
May 7, 2020
Messages
21
Thanks! It now builds correctly, but sound is gone and gamepad controls are completely messed up.
 

dawlane

Well-known member
CX Code Contributor
Tutorial Author
Joined
Jun 21, 2017
Messages
1,040
Delete the build directory and rebuild.
 

Snader

Member
Joined
May 7, 2020
Messages
21
Tried that, still no sound (I do have sound in HTML5 target) and gamepad controls are different than in html5 target.


If (JoyHit(JOY_X)) Then Print "JOY_X"
If (JoyHit(JOY_Y)) Then Print "JOY_Y"
If (JoyHit(JOY_B)) Then Print "JOY_B"
If (JoyHit(JOY_A)) Then Print "JOY_A"

All output correctly as expected on HTML5, but on DESKTOP target I get:

If (JoyHit(JOY_X)) Then Print "JOY_X" ' prints JOY_B
If (JoyHit(JOY_Y)) Then Print "JOY_Y" ' prints JOY_Y
If (JoyHit(JOY_B)) Then Print "JOY_B" ' prints JOY_A
If (JoyHit(JOY_A)) Then Print "JOY_A" ' prints JOY_X

When trying an old gamepad, it the controller problem isn't there. It seems to be a problem with the Stadia controller via USB. No other programs are affected though.
 
Last edited:

Snader

Member
Joined
May 7, 2020
Messages
21
Would it be useful to upgrade to a newer version of GLFW for the Stadia Controller problem I am having? I have no idea how to do this by the way...
 

MikeHart

Administrator
CX Code Contributor
3rd Party Module Dev
3rd Party Target Dev
3rd Party Tool Dev
Joined
Jun 19, 2017
Messages
3,499
GLFW has some mapping build for controllers build in.
Upgrading GLFW can be as easy as replacing the source files in the target or can need changes to the target as well.
 

dawlane

Well-known member
CX Code Contributor
Tutorial Author
Joined
Jun 21, 2017
Messages
1,040
When it come to upgrading GLFW. You go through the documentation and sources to make a note of any changes from the previous version. This could be the changes to source file layout, the removal of depreciate functions or addition of new functions.
You then have to replace the the glfw sources in the targets template and update all the template target platforms build files with those glfw sources.
Once that's done, you can try to build as normal. If it doesn't work, then you have to take a look at the targets native template sources to fix any issues. If it builds, but doesn't run or run correctly, then you have to open the project sources that transcc has generated into a C++ IDE for debugging. Once the issues if found, it's just a case of fixing the sources in the targets native template,
 

MikeHart

Administrator
CX Code Contributor
3rd Party Module Dev
3rd Party Target Dev
3rd Party Tool Dev
Joined
Jun 19, 2017
Messages
3,499
GitHub include GLFW 3.3.8 now. Was just a simple replacement.
 
Top Bottom