Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the code base compile with a modern GCC #3

Closed
astillich opened this issue Apr 4, 2013 · 11 comments
Closed

Make the code base compile with a modern GCC #3

astillich opened this issue Apr 4, 2013 · 11 comments

Comments

@astillich
Copy link

I'm currently in the process of doing so in order to be able to compile it on non-windows platforms. Are you guys interested in a contribution?

@PythonicChemist
Copy link

what kind of contribution?

@astillich
Copy link
Author

Fixed code, in the sense that it compiles with GCC and probably at least an initial linux port. I just read the other ticket and am moving my changes to the codebase in the jedi outcast archive. I also started a cmake based build system.

@PythonicChemist
Copy link

I'm sadly no cpp or c guy, but a linux one. I would help out testing once it compiles.

@astillich
Copy link
Author

Great, but we're not there yet. ;)

@astillich
Copy link
Author

Got a lot of the code to compile (50% of the files included in the project file, which is about 80% of the code). Issues were: function pointer default args, "or" as identifier, MSVC specific (string) functions, include path issues (case, slashes), alignment specifications, inline assembler, c/c++ mixups and some others. Remaining issue is mostly c code including c++ headers which I'll probably fix on the weekend. This may require a rework of the GL stuff. I haven't had a close look at it, and don't know the state of the GLX support, but I'd move context creation to SDL and use glew to handle OpenGL extensions if it's not workable. There currently custom code for that, maybe a solution from another quake based project could be integrated.

@eezstreet
Copy link
Contributor

Fixed, see my fork. (The function pointer default args are fixed, that is)

@flibitijibibo
Copy link

I assume it's still loading OpenGL dynamically, but if you need something to handle extensions like GLEW, just use this instead:

https://gist.github.com/flibitijibibo/5270425

For platform-specific GL, you'll probably get more mileage out of SDL2. SDL2 adds a few GL context management functions that would otherwise require some #ifdef hell to get working on all desktop platforms.

On a similar topic, you might also make maintenance/portability easier by replacing the libpng/libjpeg/zlib with stb_image. Updates and knocks out three dependencies in one go.

redsaurus pushed a commit to redsaurus/OpenJK that referenced this issue Apr 14, 2013
Fixed error in .menu file parsing on Unix
@xycaleth
Copy link
Member

Can this issue be closed now?

@eezstreet
Copy link
Contributor

Go ahead.

Sent from my Windows Phone


From: Alex Lomailto:notifications@github.com
Sent: ‎4/‎15/‎2013 6:27 AM
To: Razish/OpenJKmailto:OpenJK@noreply.github.com
Cc: eezstreetmailto:eezstreet@live.com
Subject: Re: [OpenJK] Make the code base compile with a modern GCC (#3)

Can this issue be closed now?


Reply to this email directly or view it on GitHub:
#3 (comment)

@xycaleth
Copy link
Member

MP code builds under GCC; still working on SP.

@xycaleth
Copy link
Member

Code compiles under gcc and clang now :)

AlexCS1337 referenced this issue in AlexCS1337/smUJK Dec 7, 2017
AlexCS1337 referenced this issue in AlexCS1337/smUJK Aug 4, 2022
Merge pull request JACoders#144 from DarthFutuza/master
AlexCS1337 referenced this issue in AlexCS1337/smUJK Oct 8, 2022
Merge changes from OpenJK master
linken233 pushed a commit to linken233/OpenJK_SWGL that referenced this issue Sep 9, 2023
slash-fr pushed a commit to MysticForcesDev/Mystic-Lugormod that referenced this issue Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants