eXistence / fhDOOM

Modernized DOOM3/idTech4 engine: ported to modern OpenGL (core profile), enhanced visual effects, improved performance, improved editor, more to come
GNU General Public License v3.0
181 stars 24 forks source link

Failing to build with MSVC 2017 #17

Closed motorsep closed 6 years ago

motorsep commented 6 years ago

Fails to build: https://pastebin.com/aLSFHXq4

revelator commented 6 years ago

C++11 strikes again :P This is a common problem with sources from pre C++11 era, should be easy to fix.

motorsep commented 6 years ago

Well, I'm not a C++ programmer :( Otherwise I'd submit a fix already.

revelator commented 6 years ago

narrowing-conversion.zip

here you go. apply with git's patcher.

motorsep commented 6 years ago

Thanks, that worked! However, still can't build on Windows :(

New issue: https://pastebin.com/aecDjxA5

11>RC : fatal error RC1103: invalid option, /FIprecompiled.h 11> 11>Done building project "fhDOOM.vcxproj" -- FAILED.

revelator commented 6 years ago

yeah seems to be some problem with flags not propagating properly with cmake, im seing the same. I can get around it by hand modifying the solution file in question, but a real fix would be better. Theres also another bug further down the chain with one of openal's exports causing a linker fail.

might be an idea to look at dhewm https://github.com/dhewm/dhewm3 to see how they got around the cmake problem. As for the openal problem, it might need a newer version ?.

revelator commented 6 years ago

the cmake problem seems to be that cmake's module for precompiled headers seems to make some rather bad assumptions when precompiled headers are enabled with msvc. We should probably use link time optimization instead untill they fix it ?.

The undefined function error comes from a function which no longer exists for the sound editor, removing it and all references fixes building but you still have to remove the offending precompile flags from fhDOOM.vcxproj.

Hint they are all located in the resource compiler section.

I have it up and running on Doom3 but the ROE expansion crashes.

eXistence commented 6 years ago

I fixed the narrowing error with vs2017. The other issue (RC1103: invalid option...) was related to cmake versions > 3.8 and has also been fixed.

motorsep commented 6 years ago

Still failing to build: https://pastebin.com/Hmtc8Cs5

11>Common.obj : error LNK2001: unresolved external symbol "void __cdecl EfxEditorInit(void)" (?EfxEditorInit@@YAXXZ) 11>D:\games\fhDOOM-master\build\msvc2017-x86\bin\RelWithDebInfo\fhDOOM.exe : fatal error LNK1120: 1 unresolved externals 11>Done building project "fhDOOM.vcxproj" -- FAILED.

eXistence commented 6 years ago

ooops, i should compile without Qt more often... should be fixed now. Sorry for the inconvenience :-)

revelator commented 6 years ago

yep that did the trick :) No worries, so far i have been able to build it with some minor corrections, and with new c++ standards cropping up every so often things are going to break one way or the other.

btw. any progress on the roe shaders ? i would do them myself if i could but im not very fluent in GLSL yet.

motorsep commented 6 years ago

Alright, managed to build without errors. However, rendering is all fcuked... Will open a new issue.

revelator commented 6 years ago

You probably need to replace the glsl folder in pak100fhdoom.pk4 with the one in the base folder, if existence has made changes in any part of them rendering will as you say be fucked.

revelator commented 6 years ago

Also replace the guis and maps folder just to be sure.

motorsep commented 6 years ago

@revelator There is only one glsl/ folder and only one pak100fhdoom.pk4

I "installed" fhDoom as per instructions (although I didn't overwrite the existing packs, because who does that?!) and the copied over freshly built .exe and DLLs from master repo.

revelator commented 6 years ago

I ment open the pak100fhdoom.pk4 with 7zip or some other zip utility and replace the glsl maps and gui folders in there with the ones located in the base folder in the source folder :), the shaders might have been modified since its still under development so older shaders might cause some weird behaviour unless you replace them with the new ones.

I have it up and running here with no problems besides the expansion not working yet because of missing shaders.

It's a little extra work but thats the price for testing out a build which has not yet been publicly released.