Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

dos-like

Engine for making things with a MS-DOS feel, but for modern platforms · By Mattias Gustavsson

Problem building on Mac

A topic by qarlos created Aug 09, 2022 Views: 129 Replies: 3
Viewing posts 1 to 4

Hello! this looks awesome, I still remember the old days doing some graphics in DOS using Turbo Pascal.

I try to build in Mac following the instructions, but when I try to build some example I get this error:

➜  dos-like clang source/stranded.c source/dos.c `sdl2-config --libs --cflags` -lGLEW -framework OpenGL -lpthread
In file included from source/dos.c:2:
In file included from source/dos.h:3432:
source/libs/app.h:772:18: fatal error: 'GL/glew.h' file not found
        #include <GL/glew.h>
                 ^~~~~~~~~~~
1 error generated.

It looks like glew lib is not found, but I've installed both glew and sdl2 using brew.  Has anyone tried this on Mac? maybe should add some missing path? I expected brew to configure the environment to use glew...

thnak you!

Developer

I don’t use mac myself, so probably won’t be able to help you… I know people are successfully building it on mac though, and I do build it for mac on github on every check-in to make sure I don’t break it. Here’s the github build action (but it’s the same as the build instructions, so won’t really help) https://github.com/mattiasgustavsson/dos-like/blob/76855339eddb3bcde18df1f89f610ffd840d5c21/.github/workflows/main.yml#L139

My guess is that something has gone wrong with your local build environment, but I don’t know enough about brew and mac build environments to know what to do about it.. 

Hi Mattias, thank you for your response! If github is building ok on mac, then it is definitely something wrong in my environment. I will check the action, maybe it gives me some hint.

I fixed this by including a missing path for the GL/glew.h header, so the command used to build is:

clang source/stranded.c source/dos.c `sdl2-config --libs --cflags` -I/opt/homebrew/include -lGLEW -framework OpenGL -lpthread

probably this should be already configured in the environment, and normally it should work without the "-I/opt/homebrew/include" argument.

hope I can find some free time to play with this, the CRT filter out of the box looks awesome :)