Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Problem compiling RubyGosu with VS 2005/8.0
- By treetrouble Date 2009-12-01 01:03 Edited 2009-12-01 06:10
Hi everyone,

I was able to compile the Gosu "solution"... but when building RubyGosu, I get this error:

C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\wspiapi.h(44) : error C2894: templates cannot be declared to have 'C' linkage

If it's any help, the most useful information I found in a search came up in reference to the Curl file transfer library.

http://trac.osgeo.org/gdal/wiki/FAQInstallationAndBuilding#WhyVisualC8.0failswithC2894errorinwspiapi.hwhenbuildingGDALwithlibcurlsupport

I'm not sure where wspiapi.h is being used... (i presume) Gosu isn't using winsock2.h or ws2tcpip.h.  I guess I can track down the exact usage but I'm hoping one of you has an easy fix first.

I have Boost and Ruby in the build path.

Again this is Microsoft Visual Studio 2005, the full version with the VC++ 8.0 Compiler -- Gosu source pulled down from the SVN on Saturday.

Thanks for reading, and any help is much appreciated.
- By treetrouble Date 2009-12-01 06:34
I was able to successfully compile by patching line 37 in ruby.h as such

-#include "defines.h"

+#ifdef __cplusplus
+}
+#endif
+#include "defines.h"
+#ifdef __cplusplus
+extern "C" {
+#endif

I'll follow up if I have any issues with the library
- By jlnr (dev) Date 2009-12-01 06:59
I also patch ruby.h all the time to get rid of the apparently meaningless "wrong MSVC version" check at the top. I remember having this error a while ago and chances are I used the same workaround :)
- By ? Date 2009-12-01 16:16
Yeah, I had to do that wrong version patch too-- but that was documented somewhere on this site.  I'll post here if anything else comes up with VC8
Up Topic Gosu / Gosu Exchange / Problem compiling RubyGosu with VS 2005/8.0

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill