www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Software Development

Reply
 
Thread Tools
Old 12-08-19, 17:44   #2331
ExpertRaider
Hobbyist
 
Join Date: Aug 2019
Posts: 16
Default

Hi guys! I was wondering why I can't compile the latest version of Opentomb. I downloaded it here: https://github.com/opentomb/OpenTomb...18-02-04_alpha

I followed this tutorial: https://www.youtube.com/watch?v=FrZlCmv7GRw

I made sure to compile it using Cmake to make the Code:Blocks project and then I tried to compile it with Code:Blocks and I got these errors:



If anyone could tell me what these errors mean it would be much appreciated!

Oh and also if someone could save me the trouble and just compile the latest version of OpenTomb that would be great as well. I am just surprised that no one has a compiled copy of the latest version of OpenTomb. If someone could do this for me I would like the latest version of OpenTomb compiled which is the 2018-02-04_alpha version here: https://github.com/opentomb/OpenTomb...18-02-04_alpha

Because for some reason it refuses to compile and I have all of the needed libraries and binaries.
ExpertRaider is offline   Reply With Quote
Old 13-08-19, 09:41   #2332
vvsgh
Student
 
Join Date: Jun 2015
Posts: 134
Default

First of all the version you are using is very old. The latest version is the git master branch dated July 8, 2019. You didn't specify what OS you are using. By screenshot I assume it's Windows. The errors come from OpenGL, so it seems you don't have development libraries installed for Code::Blocks and/or didn't properly configure Code::Blocks for your environment. Also, I didn't use it myself but heard that there might be issues with generated Cmake project for Code::Blocks on Windows.
vvsgh is offline   Reply With Quote
Old 13-08-19, 12:39   #2333
ExpertRaider
Hobbyist
 
Join Date: Aug 2019
Posts: 16
Default

Quote:
Originally Posted by vvsgh View Post
First of all the version you are using is very old. The latest version is the git master branch dated July 8, 2019. You didn't specify what OS you are using. By screenshot I assume it's Windows. The errors come from OpenGL, so it seems you don't have development libraries installed for Code::Blocks and/or didn't properly configure Code::Blocks for your environment. Also, I didn't use it myself but heard that there might be issues with generated Cmake project for Code::Blocks on Windows.
Where is this July 8, 2019 version of OpenTomb. Because on the official Github the latest release is from February 2nd, 2018: https://github.com/opentomb/OpenTomb/releases/

I am running Windows 7 Professional 64-bit. As for the libraries I am sure that I installed them all but I will try reinstalling some of them and see if that works. Would you know if anyone has a Cmake project for the latest version of OpenTomb? Because that would make things a whole lot easier. Thanks for your reply!

Last edited by ExpertRaider; 13-08-19 at 12:40.
ExpertRaider is offline   Reply With Quote
Old 13-08-19, 13:29   #2334
vvsgh
Student
 
Join Date: Jun 2015
Posts: 134
Default

Then I'd assume that you don't know how to use git. In that case you should use "Clone or download" button or this direct link: https://github.com/opentomb/OpenTomb/archive/master.zip There is no "official" release yet, everything you could see under "releases" are just a random snapshots made from time to time.

There is no pre-made Code::Blocks project because nobody is actually using it. The only officially supported way to build the project is just using Cmake alone, without IDE. AFAIK some developers are using something else, e.g. Apache Netbeans or Microsoft VisualStudio and maintain their own projects.
vvsgh is offline   Reply With Quote
Old 14-08-19, 11:16   #2335
ExpertRaider
Hobbyist
 
Join Date: Aug 2019
Posts: 16
Default

Quote:
Originally Posted by vvsgh View Post
Then I'd assume that you don't know how to use git. In that case you should use "Clone or download" button or this direct link: https://github.com/opentomb/OpenTomb/archive/master.zip There is no "official" release yet, everything you could see under "releases" are just a random snapshots made from time to time.

There is no pre-made Code::Blocks project because nobody is actually using it. The only officially supported way to build the project is just using Cmake alone, without IDE. AFAIK some developers are using something else, e.g. Apache Netbeans or Microsoft VisualStudio and maintain their own projects.
Ah that explains it then. Usually I don't have to download from there on git because people release the latest projects in the release tab. Maybe it wasn't working because I didn't use the latest version. Thanks for the help!
ExpertRaider is offline   Reply With Quote
Old 14-08-19, 13:29   #2336
ExpertRaider
Hobbyist
 
Join Date: Aug 2019
Posts: 16
Default

Alright I figured out the OpenGL errors by using a different SDL_OpenGL.h file and including a missing SDL_opengl_glext.h file I downloaded from the official SDL site: https://www.libsdl.org/tmp/SDL/include/

But now I found a error in the actual code of OpenTomb. The error reads "SDL_RWsize was not declared in this scope" This comes from the l_tr2.cpp source code. One of the function variables is undeclared in the source code. I tried to just declare it as a global variable integer (int), but it doesn't work because it is a function call. I would need the actual function code declaration to get past this error. It is not something wrong with Code:Blocks as it is the actual OpenTomb code at fault here:



I am 80% done compiling OpenTomb, should I just delete the SDL_RWsize part of the code and move on?

Last edited by ExpertRaider; 14-08-19 at 13:30.
ExpertRaider is offline   Reply With Quote
Old 14-08-19, 14:13   #2337
Cochrane
Gold Contributor
 
Cochrane's Avatar
 
Join Date: Apr 2006
Location: Germany
Posts: 16,093
Default

According to the documentation, that is a macro, not a function, so getting linked errors about it means that you’re probably using the wrong SDL headers. Are you sure you’re using the latest SDL 2.0?

Edit: Wait, just looked again, it’s not a linker error. Still, it’s not finding a macro, so there must be an issue with the header file. Make sure you’re using SDL 2 or higher.
__________________
GŁter auf die Bahn!

Last edited by Cochrane; 14-08-19 at 14:14.
Cochrane is offline   Reply With Quote
Old 14-08-19, 21:28   #2338
ExpertRaider
Hobbyist
 
Join Date: Aug 2019
Posts: 16
Default

Quote:
Originally Posted by Cochrane View Post
According to the documentation, that is a macro, not a function, so getting linked errors about it means that you’re probably using the wrong SDL headers. Are you sure you’re using the latest SDL 2.0?

Edit: Wait, just looked again, it’s not a linker error. Still, it’s not finding a macro, so there must be an issue with the header file. Make sure you’re using SDL 2 or higher.
Thanks for the help. It turns out I was using SDL 1.0 instead of SDL 2.0. Glad you caught that. I guess the site I downloaded SDL from wasn't the latest version. I was following the Moddb tutorial and I guess it was old. Thanks again guys!

But now there is another problem with the compiling. It is saying that snprintf is undeclared in this scope:


This is getting rather frustrating now. Why is it so hard to compile OpenTomb? Is this why there are no new official builds of OpenTomb? LOL!

Last edited by ExpertRaider; 14-08-19 at 21:38.
ExpertRaider is offline   Reply With Quote
Old 14-08-19, 22:22   #2339
vvsgh
Student
 
Join Date: Jun 2015
Posts: 134
Default

The problem with snprintf is related to C library, i.e. it's OS or compiler specific. As you didn't say what compiler brand and version you are using it's hard to know exactly.

The reason why there are no official builds available can be reduced to available resources. There are virtually no developers working on this project left. And platform coverage is very resource intensive. It always was like that and Windows is the worst. Linux is not prefect either but at least it has some means to make sure that you have the necessary libraries and versions. Under Windows you have nothing at all. Other projects either use some sophisticated package management which usually depends on OS or programming language, or they include the whole libraries inside the project tree or both. This is development hell and is one of the reasons why most developers left this project. There were disagreements about the best option to handle it. OpenLara has almost no dependencies and could be used without building locally. That might be one of the main reasons why it's more popular now. OTOH OpenTomb is more ambitious but never had enough human resources available. Most open source projects have the same problem.
vvsgh is offline   Reply With Quote
Old 15-08-19, 14:25   #2340
Cochrane
Gold Contributor
 
Cochrane's Avatar
 
Join Date: Apr 2006
Location: Germany
Posts: 16,093
Default

Let’s get the obvious out of the way first: Does the file include stdio.h or cstdio?

Edit to add: Oh, and for future reference, please don’t post giant screenshots, they’re not that helpful. Post the full compiler output instead (or build log or whatever your IDE calls it), as text, that makes things easier on everyone.

And vvsgh is completely correct. TRE is fiddly. The reason why there isn’t a current release is precisely because of what you’re seeing: It’s not really ready to be released at the moment. You’re still welcome to try and play around with it, of course, but don’t expect everything (or really, anything) to work.
__________________
GŁter auf die Bahn!

Last edited by Cochrane; 15-08-19 at 14:36.
Cochrane is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 09:05.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.