Trying to compile 4.99

Posted by Gsmith on Sun 23 Aug 2015 04:03 PM — 5 posts, 21,424 views.

#0
I'm really keen to get version 4.99 because of the changes to "Note" note interrupting a current line sent from the mud and ruining triggers (this affects me a lot).

Been waiting for months but still find it not listed pre-compiled at;
http://www.gammon.com.au/files/mushclient/?M=D
(only 4.98 is available there)

So I downloaded all the source, followed the guide on github (downloading and modifying all the extra files), loaded it in Visual Studio 2010, set the build-mode to "release-win32" and tried to build. I only get two errors both from the same file;

scripting\lua_utils.cpp(1995): error C2664: 'DWORD (HDC,LPCWSTR,int,LPWORD,DWORD)' : cannot convert parameter 2 from 'WORD *' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

scripting\lua_utils.cpp(1995): error C2664: 'DWORD (HDC,LPCWSTR,int,LPWORD,DWORD)' : cannot convert parameter 1 from 'LPWORD' to 'HDC'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

They are the only actual errors generated so I feel close to being able to compile it myself, but I can't figure out what's wrong with lua_utils.cpp (or what options I have failed to set in the project properties - it is set to "Multibye").

Any help (or if anybody has the 4.99 compiled ready to run somewhere?) would be much appreciated!

Sorry for being such a newbie, just excited about the 4.99 version :)
Australia Forum Administrator #1
If you only have those two errors, it sounds like the project type is OK.

This is the line, right?


	  if ((*pGetGlyphIndicesW)(dc.m_hDC, &glyph, 1,
	                            &indice, GGI_MARK_NONEXISTING_GLYPHS ) != GDI_ERROR &&
	          indice != 0xffff)


The prototype is a few lines up. I suggest casting to match it. Your version of the compiler is probably stricter than mine. eg.



	  if ((*pGetGlyphIndicesW)((HDC) dc.m_hDC, (LPCWSTR) &glyph, 1,
	                            &indice, GGI_MARK_NONEXISTING_GLYPHS ) != GDI_ERROR &&
	          indice != 0xffff)
Australia Forum Administrator #2
https://github.com/nickgammon/mushclient/commit/b80b50210943ed7cc4
#3
Thanks Nick - that certainly fixed that error! But I'm getting more which makes me think I shouldn't really be trying to compile this myself, as I imagine it's either me doing something stupid, or Visual Studio 2010 not being friendly enough.

Firstly I got an error saying that "zlib/minigzip.c" wasn't found. I added that from the zlib download (perhaps that's just missed out in the compile instructions on github and was always meant to be copied in). The next error though is another missing file which I'm not sure where I could find it;

1> lpeg.c
1>c1 : fatal error C1083: Cannot open source file: 'scripting\lpeg.c': No such file or directory
1> lrexlib.c

Perhaps I should just wait for the actual next release rather than over-excitedly try to do this myself! Appreciate the help (and Mushclient itself!) though Nick :)
Australia Forum Administrator #4
I'll try to get a release out. :)