Trouble Building Editor

Started by Deivore, Tue 28/04/2020 03:42:23

Previous topic - Next topic

Deivore

Hey all, I'm trying to build the editor for the first time and I'm unable to get all the projects happy. The step I'm stuck on in the readme is "setup paths to compiled libraries and their headers either in IDE options (older) or project property pages (newer)". I've successfully built allegro, alfont, downloaded irrKlang and dropped it in the appropriate editor folder, and have been setting the aforementioned builds as additional include directories in the project files that request them. I was also able to install August 2007 directX.

My current errors are the following:

eri0o

Which Solution have you tried to open? Where did you get the source code? Which branch?

Deivore

This is the AGS.Editor.Full.sln
The source code is from https://github.com/adventuregamestudio/ags
The current branch is "master"

Running on windows 7 using MSVS 2015 community.

Crimson Wizard

It sais that it cannot find "alleg-debug-static.lib", which seems as a blocking issue there. (It's needed for the AGS.Native dll)

Have you built allegro from our repository, or from the official one? If latter, you may have to rename the output lib. (In our fork the output names are set up for needs of AGS)

Deivore

The former; my alleg-debug-static.lib is built from the AGS repo from the patched branch. I put these libs in a folder near my AGS repo and added an entry for it in the windows path variable but I haven't gotten AGS.Native to "see" it which I expect is some kind of project setting I'm unfamiliar with.

Crimson Wizard

#5
Sorry, I myself keep getting bit confused every time with this in new MSVS. There are two kind of path settings, the project's own settings and your local settings.

1. Project own settings are found if you open project's Properties. For C++ projects there's a tab called "VC++ Directories", where you may setup paths to includes and libs, separately.
This is a simpliest way to set these dirs, but changing these will be a change to project itself, and everyone will get them (if you commit to a repo).

2. Local or user settings, on other hand, belong only to you. They are edited in something called "Property Sheets" in MSVS. To edit these, go to View -> Property Manager (or sometimes View -> Other windows -> Property Manager). You will see a tree of folders.
If you open any of the project names and double click "Microsoft.Cpp.Win32.user". That will open your user settings shared between all the C++ MSVS projects.
In there you go to "VC++ Directories" and set up Include and Lib directories which will be used by MSVS on your computer.

Above will actually set directories for all the projects of this kind, which in theory may cause problems if, for example, you need to use separate versions of same lib in different projects. There have to be a way to set user settings up on per-project basis, but I did not try that myself yet. If you're interested, the second link below seems to explain how it's done.

Alternatively, I think that you may also setup "LIB" system variable ("PATH" is strictly for executables), as MSVS mentions on the property page tip, but frankly I don't remember if that works.


There are some docs on this:
https://docs.microsoft.com/en-us/cpp/build/reference/vcpp-directories-property-page?view=vs-2019
https://docs.microsoft.com/en-us/cpp/build/create-reusable-property-configurations?view=vs-2019

Deivore

Awesome, that solved the AGS library error, cheers! I ended up modifying the project, in development I'd be forking and not committing project changes.

I do have a new error in addition to those listed above, "cannot open file 'dinput.lib'" which appears to be a DirectX library I didn't get from the Aug 2007 download? I'll have to track that one down.

Most of the rest of the errors seem to have to do with various projects being unable to resolve the AGS.Native namespace. The error "NativeMethods is inaccessible" is the compiler assuming a windows' "NativeMethods" is the intended reference, but since there's a "NativeMethods" file in AGS.Native I suspect that error too will disappear when the namespace is resolved.

The weirdest error to me is that the compiler thinks "AGSEditor.exe" is a metadata file?

morganw

#7
I added the property sheets to solve this problem.

Code: dos
set | findstr /b AGS_
AGS_ALFONT_LIB=D:\Build\ags-prebuilt-libs\vs2015\alfont-1.9.1
AGS_ALLEGRO_INCLUDE=D:\Build\lib-allegro\include;D:\Build\lib-allegro\build\VS2015\include
AGS_ALLEGRO_LIB=D:\Build\ags-prebuilt-libs\vs2015\allegro-4.4.2
AGS_DIRECTX_LIB=C:\Program Files (x86)\Microsoft DirectX SDK (August 2007)\Lib\x86\
AGS_LIBOGG_LIB=D:\Build\ags-prebuilt-libs\vs2015\libogg-1.3.2
AGS_LIBTHEORA_LIB=D:\Build\ags-prebuilt-libs\vs2015\libtheora-1.1.1
AGS_LIBVORBIS_LIB=D:\Build\ags-prebuilt-libs\vs2015\libvorbis-1.3.4


Just set these environment variables globally and they will work for all recent Solutions. The Alfont one is no longer required, unless you are building slightly older versions. As a side note: the DirectX installer is very old so I would recommend just extracting the files from the installer, rather than actually installing it.

Deivore

Eyy, that did it!! It also took another manual addition to the AGS.Native library references for some reason, but it builds and runs! Thanks so much, all!

Crimson Wizard

Quote from: Deivore on Wed 29/04/2020 02:45:41
Eyy, that did it!! It also took another manual addition to the AGS.Native library references for some reason, but it builds and runs!

Could you tell what did you have to add?

Crimson Wizard

Looks like solved, and safe to lock.

SMF spam blocked by CleanTalk