Modcraft - The community dedicated to quality WoW modding!

Featured => Noggit => Topic started by: Greenpro on September 13, 2017, 06:29:04 pm

Title: Noggit compile error help
Post by: Greenpro on September 13, 2017, 06:29:04 pm
Hi.
I am trying to compile noggit, and I believe I have done most things right, but I cant seem to build it in Visual Studio.
Here is my error log https://pastebin.com/E8ApZPNi

Thanks.
Title: Re: Noggit compile error help
Post by: Steff on September 14, 2017, 03:06:39 pm
The stormlib src path needs to be set inside cmake. Also you need to compile stormlib after you donwloaded it.

Quote
Cannot open include file: 'StormLib.h': No such file or directory
Title: Re: Noggit compile error help
Post by: Greenpro on September 15, 2017, 07:21:35 pm
Sorry for being stupid about this, but i am not sure if i compiled storm properly, i have compiled it in Visual studio and i have two files (stormlibDAD.lib and stormlibRAD.lib) but i am not sure if that is what i am supposed to do. When i go to compile noggit in cmake, i have three options (_storm_any_lib, _storm_debug_lib and _storm_release_lib) i have set the _storm_debug_lib to StormlibDAD.lib, and i have set _storm_release_lib to StormlibRAD.lib. I don't know what to set _storm_any_lib to though.
Title: Re: Noggit compile error help
Post by: schlumpf on September 15, 2017, 07:46:11 pm
Any of them.

You actually shouldn't set any variable prefixed with an underscore. We are using cmake since it should automatically find things. We use https://cmake.org/cmake/help/v3.4/command/find_path.html to search the include directory and https://cmake.org/cmake/help/v3.4/command/find_library.html to search the library. Cmake defines a set of paths that are searched in. A developer is supposed to install stormlib to one of the directories already in that set searched (e.g. a system wide installation in /usr/local on Linux) or add the path stormlib is installed in to one of the lists searched in, e.g. CMAKE_PREFIX_PATH.

Then, everything works automatically and the variables are set as intended.
Title: Re: Noggit compile error help
Post by: Greenpro on September 15, 2017, 08:40:34 pm
Ok so where should i put my StormlibDAD.lib and StormlibRAD.lib? Or is there something else i have to do to get storm found by cmake?
Title: Re: Noggit compile error help
Post by: schlumpf on September 15, 2017, 08:58:02 pm
Try setting CMAKE_PREFIX_PATH so that either StormlibRAD.lib or lib/StormlibRAD.lib are at CMAKE_PREFIX_PATH, as described in the linked documentation.

Also note that there is a BUILDING section in the readme which is also on the front page of the repository at https://bitbucket.org/berndloerwald/noggit3
Title: Re: Noggit compile error help
Post by: Greenpro on September 15, 2017, 09:48:58 pm
I'm not sure how I missed that part, oops, it works now, sorry for this.