podiki / libtcod-mac

current libtcod builds on mac, do not need to use this port

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

slightly wrong SDL.h path

speeder opened this issue · comments

I just installed and compiled this.

One interesting thing, is that in most places, it looks for SDL/SDL.h but in the libtcod.h file there is a ifdef for OSX, that looks into only <SDL.h>, this made samples fail to compile on my machine.

Upon changing line 109 of libtcod.h to <SDL/SDL.h> then it worked correctly.

commented

Interesting. When I tried most recently I did not have any problems, using SDL2 that was installed by homebrew. How did you install SDL and what is your build environment like?

I should note that I do not have access to a Mac anymore (or at least for the near future), and this repo is behind upstream.

This happened when using SDL1, not SDL2.

I actually didn't even tried SDL2, I don't like SDL2 license. (seemly neither upstream, they are trying to get rid of SDL2 too)

commented

Ah, I see. Probably your change doesn't work then for SDL2, but I'm not sure, as my original goal was for SDL2 only.

Is SDL1 being developed anymore? Where did you see about upstream not liking SDL2? I read the opposite, directly from the Bitbucket page:

SDL2 is the latest version of SDL. While the latest code for libtcod retains the support for SDL, it is not recommended you use it. The SDL support will eventually be removed, and if you choose to use it, you will be incurring extra work for you further down the road.

Ah, I see. I must have misread that phrase, I thought they would remove SDL completely and go for OpenGL or something.

commented

Well in the past they have supported several different rendering backends (including OpenGL, via SDL), but not sure what their plans are now.

I'll close this, but maybe it will be useful to anyone else if they try to compile against SDL1.

By the way, if you are interested, I didn't have a chance to try to get the current upstream version to compile on Mac. It's possible it will just be the little fixes we already have, so it would be worth it to see if that is easy to do. Like I said, I don't have a Mac currently, but it would be great if someone could so there can be official Mac support. See also #4 and on Bitbucket.