[Windows] Tons of errors while building first time

For discussion of the code running behind the game

Moderator: Staff

Post Reply
Lordakius
Junior Member
Posts: 26
Joined: Thu May 26, 2016 3:22 pm

[Windows] Tons of errors while building first time

Post by Lordakius » Tue Aug 30, 2016 7:38 pm

Trying to compile Allacrost with Code:Blocks under Windows got me a ton of errors (literally) :bang: .
The first 50 errors (compiler only shows 50) are either /"..." not declared/ or /"..." does not name a type/ ones.

Image
(Sorry for the German Compiler lang, don't know where this comes from xD - should be easy to translate, though)

As far as my knowledge/research goes, those not declared errors are there because the functions are not declared (obviously ^^) or declared in another namespace (may I got the definition of namespaces wrong somehow, if so I am sorry :D)

The problem why I am asking here is, that I couldn't find those declarations anywhere and I am wondering if this is due the recent updates that those files are not used anymore but still somehow in the code?
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: [Windows] Tons of errors while building first time

Post by Roots » Tue Aug 30, 2016 8:05 pm

None of those functions come from our code. If you look at the file, most are coming from the C++ standard library. I think either you're missing library files, or something else with your build environment is broken. So it's not the Allacrost code that is broken, but some dependencies Allacrost has on standard C++ functions being available. :shrug: I'm also having library issues with my build at the moment, but they are with SDL and other libraries in our dependencies package, not standard C++ libs. I'm going to keep trying to get Windows building on my end and if I make any progress figuring this all out, I'll let you know.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: [Windows] Tons of errors while building first time

Post by Roots » Tue Aug 30, 2016 10:34 pm

I got it to compile tonight. I did the following:
1) Made a fresh clone from the main repo
2) Copied the allacrost-win32-depends directory to the main directory
3) Did an "add files recursively" operation on src/. Then I removed all files from src/editor
4) Making some small changes to the project file to add new source files (which I will commit to the main repo eventually)

It didn't run because it looks in the base directory for all the DLL files, but those can be easily copied over.


Anyway, this validates my earlier statement that something is wrong with your build environment (mingw stuff it looks like). It's hard for me to say what exactly is wrong with the mingw install on your system. Could be as simple as that you didn't download all the packages you needed for it. If you look at this post where I initially reported I was able to build on Windows, the very first step says "make sure to check to install the gcc/g++ compiler". Did you do that?

If you still can't figure it out, let me know and I'll see if I can dig through my mingw install and figure out what packages I checked to install or whatever. I'm going to be working on updating the code::blocks project files. One thing I'm planning to do is to create a directory called build/ or lib/ or something for all the library files (instead of having allacrost-win32-depends). I'm also going to see if I can figure out how to point it to the DLL files in the lib/ directory instead of requiring the DLLs to be in the base directory to run the game.
Image
Lordakius
Junior Member
Posts: 26
Joined: Thu May 26, 2016 3:22 pm

Re: [Windows] Tons of errors while building first time

Post by Lordakius » Wed Aug 31, 2016 4:04 am

What do you mean with "3) Did an "add files recursively" operation on src/. Then I removed all files from src/editor"
Where do i do that?
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: [Windows] Tons of errors while building first time

Post by Roots » Wed Aug 31, 2016 8:10 am

http://wiki.codeblocks.org/index.php/Cr ... sting_file

I think I right-clicked the sources folder in the project menu pane on the left and found those options. The link above gives another way to find them.
Image
Lordakius
Junior Member
Posts: 26
Joined: Thu May 26, 2016 3:22 pm

Re: [Windows] Tons of errors while building first time

Post by Lordakius » Fri Sep 02, 2016 5:31 pm

I actually got it working. Seems like I were missing some things from MinGW. I downloaded Code:Blocks with mingw installer this time and set the compiler on the gcc in that folder and now it builds properly :)

If anyone faces the same errors: (not able to compile any c++ files/allacrost via Code:blocks
1)http://www.codeblocks.org/downloads/26
2)download codeblocks-16.01mingw-setup.exe
3)after installation, in Code:Blocks go into Settings->Compiler...->toolchain executables->Compilers installation directory either auto-detect or search for the MinGW folder in your Code:Blocks folder and select
4)Compile
Lordakius
Junior Member
Posts: 26
Joined: Thu May 26, 2016 3:22 pm

Re: [Windows] Tons of errors while building first time

Post by Lordakius » Sun Sep 04, 2016 8:59 pm

I've encountered another error while building.

Code: Select all

C:\Users\Lordakius\Desktop\allacrost\game\src\editor\dialogs.cpp:17:18: fatal error: QDebug: No such file or directory

Code: Select all

#include <QDebug>
Sadly, I have no idea how the error occurs. I have searched a bit and found the Qt Framework, which we are obviously using (some dll's in the lib folder). So it seems as a problem of either missing library or wrong path ?

*edit: I have got the latest updates but have no /lib in my allacrost folder. The libraries are still in allacrost-win32-depends
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: [Windows] Tons of errors while building first time

Post by Roots » Sun Sep 04, 2016 11:04 pm

I don't think I've yet gotten the editor to compile on Windows. I'm pretty sure that the QT libraries in the package need to be updated, as we're using a more recent version of QT (I can't recall exactly which right now). I wouldn't worry about compiling the editor unless you actively want to work at it to get it working. Hopefully just updating the QT library files will fix the problem, but I wouldn't be surprised if it took more work than that. :uhoh:
Image
Lordakius
Junior Member
Posts: 26
Joined: Thu May 26, 2016 3:22 pm

Re: [Windows] Tons of errors while building first time

Post by Lordakius » Mon Sep 05, 2016 6:48 am

How can I compile everything but the editor? When trying to build he wants to compile the editor, too.
I'll try a bit around, maybe I can get it working ^^
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: [Windows] Tons of errors while building first time

Post by Roots » Mon Sep 05, 2016 7:56 am

Remove all files from src/editor from the build. If you look at this commit I made a couple days ago to the main repo, I updated the Allacrost.cbp (project) file. You should be opening this file when you are attempting to build. It does not include the editor files.
Image
Lucasta
Newbie
Posts: 1
Joined: Wed Sep 12, 2018 11:46 am

Re: [Windows] Tons of errors while building first time

Post by Lucasta » Wed Sep 12, 2018 12:06 pm

Remove all files from src/editor it will be solved
Post Reply