[SOLVED]GTK Radiant 1.6.4 compiling issue with VS2013Express

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

[SOLVED]GTK Radiant 1.6.4 compiling issue with VS2013Express

Post by toneddu2000 »

Hi guys, I'm trying to compile current version of GTKRadiant from here on Windows 7 64 Bit and I've a strange issue:
In the project configuration it needs

Code: Select all

$(SolutionDir)\..\STLport-5.2.1\stlport
So I downloaded Stlport from here but the compilers yells these errors:
C:\progs\STLport-5.2.1\stlport\stl/_cstdlib.h(158): error C2084: function '__int64 abs(__int64) throw()' ha already a body
5> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\../include/stdlib.h(501): see previous declaration of 'abs'

So, I imagine, STL port conflicts with STL from microsoft, but if I didn't include STLport it says it can't find stl header files! (obviously)

Would it work if I comment ALL the functions declaration in STLport header files? (I know it sounds crazy but I'd really like to compile it and I tried every other method! :) )

I use VS2013 Express

Thanks in advance

PS: Is the thread right here or should it go in Mapping section?
Last edited by toneddu2000 on Sat Jun 07, 2014 11:43 am, edited 1 time in total.
Meadow Fun!! - my first commercial game, made with FTEQW game engine
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: GTK Radiant 1.6.4 compiling issue with VS2013 Express

Post by revelator »

Not sure why gtkradiant uses stlport :?: compared to the stl in 2013 it lacks support for the newest standards like c++11 and there has not been lots of development lately on it.
STLport was ment for older compilers lacking certain modern instructions like msvc6 its kinda overkill to use it for a modern msvc.

besides that you probably need to configure STLport for msvc 2013, that should take care of the errors.

Just tried and stlport does not build with msvc 2013 so bugger :(

just try and build without it remember to remove the folder or gtkradiant will still pick it up.
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: GTK Radiant 1.6.4 compiling issue with VS2013 Express

Post by revelator »

Patched stlport-5.2.1 to build with msvc 2013 + fixed the errors.
I precompiled the libraries for msvc 2010 - 2012 - 2013 both x86 and x64 so its ready for use.
dll's and libraries are in subdirs of the bin and lib folder in stlport named after the msvc version there intended for.

you can get it here http://sourceforge.net/projects/cbadvan ... z/download
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: GTK Radiant 1.6.4 compiling issue with VS2013 Express

Post by revelator »

Built gtkradiant with msvc 2012 and my own ports of iconv and libxml2 (static).

you can get it here https://sourceforge.net/projects/cbadva ... tkradiant/

stlport was not needed at all :) but i had to modify sources a bit so it would skip it.

im no mapper but test seems to indicate that it works 100% you need the msvc11 runtime though.
Productivity is a state of mind.
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: GTK Radiant 1.6.4 compiling issue with VS2013 Express

Post by toneddu2000 »

Whoa! I just arrived and I see all this good stuff! :)
As always, I owe you a lot reckless, thank you!
Ok, I tried first the STLPort you uploaded and I replaced my STLport folder with yours but it gave me always errors during radiant compile. (I just included the STL header files)
Then I ran the build-msvc13-x86 batch file (impressive by the way!) and it compiles fine, creating lib files in the lib folder. Now? :) I also included the STLport lib folder in the "Libraries directory" of the project pane, but it returns errors anyway.
The error is in the stl_check.h

Code: Select all

#if !defined( _STLP_DONT_USE_EXCEPTIONS )
#error exc
#endif

Code: Select all

c:\progs\gtkradiant-master\include\stl_check.h(39): fatal error C1189: #error :  exc
I tried your radiant exe and it works perfectly. Can you please post the source? In that way I could compile radiant without STLport finally! :lol:

Thanks again reckless!
Meadow Fun!! - my first commercial game, made with FTEQW game engine
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: GTK Radiant 1.6.4 compiling issue with VS2013 Express

Post by revelator »

hehe np but its rather large because of the needed libraries ill pack it all up tomorrow and post a link.

stlport is not needed with 2013 :) so i disabled it in the radiant source.
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: GTK Radiant 1.6.4 compiling issue with VS2013 Express

Post by revelator »

btw if you really want to mess with stlport open the stlport source directory and go to stlport \stl\config and find the _msvc.h file.

theres a block of code in it like this

/* These switches depend on compiler flags. We are hoping here that compilers
* simulating MSVC behavior use identical macros to report compilation context.
* Otherwise those macros will have to be undef in specific compiler configuration
* files.
*/
#ifndef _CPPUNWIND
# define _STLP_DONT_USE_EXCEPTIONS 1
#endif

change it to look like this

//#ifndef _CPPUNWIND
# define _STLP_DONT_USE_EXCEPTIONS 1
//#endif

that should take care of the error you get.
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: GTK Radiant 1.6.4 compiling issue with VS2013 Express

Post by revelator »

Well thanks to the magic of having a fibernet connection and still being awake :lol: heres the magic :)

https://sourceforge.net/projects/cbadva ... tkradiant/

just get the gtkradiant_src+libs.7z from there and unpack in some non disclosed path then go to town on it ;)
p.s you might need to update the solution to msvc 2013 i used 2012 to build it, the compiler should tell you that though so just answer yes if it asks ;)
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: GTK Radiant 1.6.4 compiling issue with VS2013 Express

Post by revelator »

Just to be sure that stlport works i also checked if the single define was enough, its not.

you need these in _msvc.h

/* well since we cant use these things anyway for gtkradiant lets just disable them here */
#if !defined (__BUILDING_STLPORT)
#define _STLP_DONT_USE_EXCEPTIONS 1
#define _STLP_NO_NAMESPACES 1
#define _STLP_NO_IOSTREAMS 1
#endif

yank them in right after

#define _STLP_PRAGMA_ONCE

and it builds ;)
Productivity is a state of mind.
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: GTK Radiant 1.6.4 compiling issue with VS2013 Express

Post by revelator »

msvc 2013 build here https://sourceforge.net/projects/cbadva ... tkradiant/

look for the gtkradiant-1.6.2.7z

built with stlport-5.2.1 jpeg9a libxml2-2.9.1 gtk-2.24.10 gtkglext-1.2.0
stlport is a patched version by me and totally unnessesary with later msvc :) but here ya go.

so far it seems to work 100% like the previous build, needs a newer msvc runtime though ;).
Productivity is a state of mind.
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: GTK Radiant 1.6.4 compiling issue with VS2013 Express

Post by toneddu2000 »

man, you're awesome! :D
I built your version and it compiled perfectly! WOW

After compilation I copied all the .exe (located in the install folder) in the radiant version you uploaded just ten minutes ago and it's all OK.
But if I use GTK radiant original installer or the old one you uploaded yesterday, the new exe compiled make radiant to crash.
Don't know why but I don't care. It works with the new one! :lol:

Tonight I'll try to get rid of STLport from a fresh GTKradiant src following your guidelines (just for fun, I don't need it now)

Thanks really a lot reckless
Meadow Fun!! - my first commercial game, made with FTEQW game engine
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: GTK Radiant 1.6.4 compiling issue with VS2013 Express

Post by revelator »

Your welcome ;) probably a good idea to get rid of stlport from your source, older compilers like msvc6 and to some extent 7 and 8 might benefit from using it but its not really ment for newer compilers :)
if you use digital mars or the old borland compiler its a big help though ;) not sure if radiant even builds with those ?.

It builds with the patches i provided so if you want to save some work just let it be ;) it does no harm atleast.
Productivity is a state of mind.
Post Reply