• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

HOW TO: Build desktop target

Martin

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Jun 19, 2017
Messages
344
Windows

To build the desktop (GLFW3) target you need to install MinGW.

We recommend to use this MinGW build (TDM): https://www.cerberus-x.com/downloads/tdm-gcc-64.zip

Just unzip it, don't use the installer inside the unziped folder. Then in your Cerberus folder, open the file bin/config.winnt.txt and change the variable MINGW_PATH to the path where you've MinGW installed.

That's it. You should now be able to build desktop apps.

You can make more build adjustments in the targets folder config file: targets/glfw3/templates/config.cxs

GLFW_USE_MINGW - Set it to True to us MinGW, to False to use Visual Studio (currently not working!)
GLFW_GCC_MSIZE_WINNT - 64 for 64bit builds, 32 for 32bit builds


Mac OS

To build the desktop (GLFW3) target you need to install XCode.

That's it. You should now be able to build desktop apps.

You can make more build adjustments in the targets folder config file: targets/glfw3/templates/config.cxs
 
Last edited by a moderator:
When it comes to installation for Linux you should read monkey-linux-install-manual.tar.gz.
A lot of this is still relevant apart from the stuff about the Qt development libraries and building Ted.
 
There are a number of options in the installer for mingw that is linked to from inside cerebus. I am not sure what to select. I have selected the 64 bit and the c/c++ version(not all packages). I hope it works.

After installing I trie dto compile and got a error. It seems to point to the openal lib. I installed that. The message is : "
../openal/libs/Win64/OpenAL32.lib: error adding symbols: File in wrong format

collect2.exe: error: ld returned 1 exit status"

I am going to try to install the 32 bit version of mingw and see if that solves it.

I installed the 32 bit version and now get another error when compiling. "../main.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in"

I am going to try to install the official monkeyx and see if that works.

I installed the free monkeyX from itch and it compiles desktop without problems. It has mingw included so you do not need to install this at all. But this is the free version. It seems desktop is broken for me for now.
 
Last edited:
MinGW 5.x+ has a problem with .LIB files. You will need to do two things:
  1. Open the Makefile for gcc_winnt in the targets template directory and remove the -L paths option in LDFLAGS.
  2. Download the Windows binaries for OpenAL soft and install them system wide.
See second post here for more details.
 
Last edited:
That's very good help, thanks for that!

But I am wondering that if MX 86 can compile fine then why CX is causing issues?
 
That's very good help, thanks for that!

But I am wondering that if MX 86 can compile fine then why CX is causing issues?

MX was 32 bit, we changed 99% to 64bit. That can cause some disturbance which hopefully will be iron out. But I am surprised.
I can compile just fine here, didn't need to change anything.

You are using the version we recomment? 4.9.2?
 
Oh yes, works fine with your 4.9 version, sorry!
 
@Martin: How about shipping MingW with thew Windows installation in a sub folder and the config file already pointing to it so the windows user can run the GLFW target out of the box? The free Monkey version did that too. As Cerberus is basically free, I think it would be fine or? Or is the distribution on itch.io working against the license?
 
hi, cant compile game. pls help

"D:/Program Files (x86)/Cerberus/bin/transcc_winnt" -target=Desktop_Game_(Glfw3) -config=Release "D:/Program Files (x86)/Cerberus/spacegame/spacegame.monkey"

TRANS cerberus compiler V2017-10-24

Parsing...

Semanting...

Translating...

Building...

g++ -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/main.o ../main.cpp

g++ -m64 -s -LD:/Program Files (x86)/Cerberus/libs/Win64 -Wl,--subsystem,windows -o Release64/CerberusGame build/Release64/context.o build/Release64/egl_context.o build/Release64/init.o build/Release64/input.o build/Release64/monitor.o build/Release64/osmesa_context.o build/Release64/vulkan.o build/Release64/wgl_context.o build/Release64/win32_init.o build/Release64/win32_joystick.o build/Release64/win32_monitor.o build/Release64/win32_time.o build/Release64/win32_thread.o build/Release64/win32_window.o build/Release64/window.o build/Release64/stb_vorbis.o build/Release64/stb_image.o build/Release64/main.o -lcomdlg32 -lgdi32 -lopengl32 -lopenal32 -lws2_32

g++: error: Files: No such file or directory

g++: error: (x86)/Cerberus/libs/Win64: No such file or directory

Makefile:53: recipe for target 'Release64/CerberusGame' failed

mingw32-make: *** [Release64/CerberusGame] Error 1

TRANS FAILED: Error executing 'mingw32-make CCOPTS=" -m64 -O3 -DNDEBUG" LDOPTS=" -m64 -s -LD:/Program Files (x86)/Cerberus/libs/Win64" LIBOPTS=" -lopenal32" OUT="Release64/CerberusGame"', return code=2

Done.
 
As something quick to try put Cerberus to a simpler folder structure without spaces. "Program Files (x86)" could be an issue, sorry this is just a guess from me.
 
As something quick to try put Cerberus to a simpler folder structure without spaces. "Program Files (x86)" could be an issue, sorry this is just a guess from me.

thanks muruba i think that did it. so how do i find or turn it into an executable? dont know how to use the file. thanks
 
Is anyone aware of how to change the icon displayed in the window of a glfw3 game on windows?
 
Not via code. You need to change the exported project or with a resource hacker on the application.
 
Back
Top Bottom