Compiling spring (mingw and visual studio 7/8) - Page 4

Compiling spring (mingw and visual studio 7/8)

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Post by SeanHeron »

That worked a treat thanks :) . Ill have to remember to google search myself next time.
renrutal
Posts: 84
Joined: 28 Apr 2005, 16:45

Post by renrutal »

With all these MSVC++ issues, I won't be surprised if the other platforms get the game working faster than on Windows.

Who said M$ isn't helping the open source software; most Linux distros are less than 1.5 GB ;)

Maybe one day we might make our own Spring + Spring SDK livecd. :lol:
jouninkomiko
Posts: 436
Joined: 26 Aug 2004, 08:11

Post by jouninkomiko »

haha :)

Yeah, I agree that msoft (zomg my soon to be employer) adds ALOT of bloat to anything they release for the sake of making it **pretty**. The libraries and stuff are prolly only some 10% of the entire package, the rest being chm help files, sample code, etc etc etc **puke**. I have come to like and appreciate what linux is doing, but some things are still hard to do correctly in it. For example, dual mons. (ANYONE with dual mons and linux knows exactly what I'm talking about). VS is cake to use if you're provided with the sln files and all the libs you need to dl, which pretty much suffers the same problem in linux. Dependency hell blows badly. As far as code deprecation is concerned (namely the fopen "warning") I can only assume the purpose of that is to get devs to realize they won't be able to use those c-runtime functions for much longer. They are inherently unsafe by no fault of the OS, and soon I imagine the Windows OS will have a thick layer between the OS and any application and completely block stuff like "fopen" and raw socket stuff to ward off potentially malicious code.
patmo98
Posts: 188
Joined: 09 Jan 2006, 17:51

Post by patmo98 »

jouninkomiko wrote:Windows OS will have a thick layer between the OS and any application and completely block stuff like "fopen" and raw socket stuff to ward off potentially malicious code.
In the MSDN library it says:
"It should be noted that in this context, "deprecated" just means that a function's use is not recommended; it does not indicate that the function is scheduled to be removed from the CRT."
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

As far as code deprecation is concerned (namely the fopen "warning") I can only assume the purpose of that is to get devs to realize they won't be able to use those c-runtime functions for much longer. They are inherently unsafe by no fault of the OS
I have to disagree with that, fopen/fputs/fwrite is not inherently unsafe by itself. It's just the pointer handling that makes C/C++ unsafe, but that applies to any part of C/C++. I would say iostream is just as safe or unsafe as fopen/fclose.
patmo98
Posts: 188
Joined: 09 Jan 2006, 17:51

Post by patmo98 »

Zaphod wrote:I have to disagree with that, fopen/fputs/fwrite is not inherently unsafe by itself.
I would say that they are inherently unsafe in the same way a sharp knife is. Both are very useful tools, but if used wrong either can have very bad conquences.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.
If C gives you enough rope to hang yourself, then C++ gives you enough rope to bind and gag your neighborhood, rig the sails on a small ship, and still have enough rope to hang yourself from the yardarm.
jouninkomiko
Posts: 436
Joined: 26 Aug 2004, 08:11

Post by jouninkomiko »

I know that's what MSDN says, but I wouldn't be surprised if a future version of windows ran all applications in a sandbox and disallowed stuff like fopen ^_^. While fopen is not inherently unsafe, it can be more easily abused by manipulating pointers sent to it etc. The idea is to move all the low level pointer stuff to trusted code, and tell you that the compiler thinks using fopen isn't the best way of doing things.
furyhawk
Posts: 4
Joined: 28 Apr 2006, 11:26

Re: Having trouble with libc.lib

Post by furyhawk »

patmo98 wrote:I am using the free copy of Visual C++ 2005 off the Microsoft website. RTS finally compiles, but it is asking for LIBC.lib. I read greenail's instructions, but I don't understand them. Would you please give this C++ newbie a little more help? Thanks.
EDIT:
If anyone wants a copy of boost compiled for VS8.0 I'd be happy to send it. I just don't have any web space.
I too have this LIBC.lib error. what did I forgot to do? forgive my noobz question. Any solution?
patmo98
Posts: 188
Joined: 09 Jan 2006, 17:51

Re: Having trouble with libc.lib

Post by patmo98 »

furyhawk wrote:I too have this LIBC.lib error. what did I forgot to do? forgive my noobz question. Any solution?
Step 1: Install the PSDK.

Step 2: Follow the instructions here http://msdn.microsoft.com/vstudio/expre ... usingpsdk/
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

At soem point I was told that LIBC couldnt be sued because another library was itnerfering, I fixed it but it was a while ago and I've nto ahd that error in a long while
furyhawk
Posts: 4
Joined: 28 Apr 2006, 11:26

Post by furyhawk »

i got the Windows® Server 2003 R2 Platform SDK Full Download actually

http://www.microsoft.com/downloads/deta ... laylang=en

it doesn't include libc.lib too... do i have to install both version?
patmo98
Posts: 188
Joined: 09 Jan 2006, 17:51

Post by patmo98 »

furyhawk wrote:i got the Windows® Server 2003 R2 Platform SDK Full Download actually

http://www.microsoft.com/downloads/deta ... laylang=en

it doesn't include libc.lib too... do i have to install both version?
I never needed to install libc.

I never needed to install libc.

That message went away when I did this http://msdn.microsoft.com/vstudio/expre ... usingpsdk/
furyhawk
Posts: 4
Joined: 28 Apr 2006, 11:26

Post by furyhawk »

build it finally. main problem with

.\rts.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'. fixed.

and place libc.lib in the list to be ignored library.

now mainly problem with complieing CrashRpt.

Error 1 error C2440: 'return' : cannot convert from 'const char *' to 'TCHAR *' d:\www\taspring_0.70b3\crashrpt\wtl70\include\atlmisc.h 982


thanks :)
patmo98
Posts: 188
Joined: 09 Jan 2006, 17:51

Post by patmo98 »

furyhawk wrote:build it finally. main problem with

.\rts.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'. fixed.

and place libc.lib in the list to be ignored library.
Where are you getting the source? That problem was fixed in the SVN a while ago.

Just replace every mention of afxres.h with winresrc.h

That allow you to compile spring without the "pro" edition of Visual Studio.
furyhawk
Posts: 4
Joined: 28 Apr 2006, 11:26

Post by furyhawk »

not from svn, from the 0.70b3 source.
Compiler does not allow const_cast to down cast under /clr:oldSyntax
Prior to Visual C++ 2005 the Visual C++ compiler allowed the const_cast Operator to down cast when compiling source code that uses Managed Extensions for C++ syntax. Performing a down cast with const_cast now results in Compiler Error C2440. To resolve, use the correct cast operator (for more information, see Casting Operators). This change was made for conformance reasons.
VS2005 doesn't allow down casting of const char...
patmo98
Posts: 188
Joined: 09 Jan 2006, 17:51

Post by patmo98 »

furyhawk wrote:not from svn, from the 0.70b3 source.
Compiler does not allow const_cast to down cast under /clr:oldSyntax
Prior to Visual C++ 2005 the Visual C++ compiler allowed the const_cast Operator to down cast when compiling source code that uses Managed Extensions for C++ syntax. Performing a down cast with const_cast now results in Compiler Error C2440. To resolve, use the correct cast operator (for more information, see Casting Operators). This change was made for conformance reasons.
VS2005 doesn't allow down casting of const char...
Try either 0.71b1 or SVN
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

I'm trying to build subversion version using visual studio 2005, and I have last one linker problem:

Code: Select all

Error	16	error LNK2001: unresolved external symbol "public: 
__thiscall boost::re_detail::perl_matcher<class 
std::_String_const_iterator<char,struct std::char_traits<char>,class 
std::allocator<char> >,class std::allocator<struct boost::sub_match<class 
std::_String_const_iterator<char,struct std::char_traits<char>,class 
std::allocator<char> > > >,struct boost::regex_traits<char,class 
boost::w32_regex_traits<char> > >::perl_matcher<class 
std::_String_const_iterator<char,struct std::char_traits<char>,class 
std::allocator<char> >,class std::allocator<struct boost::sub_match<class 
std::_String_const_iterator<char,struct std::char_traits<char>,class 
std::allocator<char> > > >,struct boost::regex_traits<char,class 
boost::w32_regex_traits<char> > >(class 
std::_String_const_iterator<char,struct std::char_traits<char>,class 
std::allocator<char> >,class std::_String_const_iterator<char,struct 
std::char_traits<char>,class std::allocator<char> >,class 
boost::match_results<class std::_String_const_iterator<char,struct 
std::char_traits<char>,class std::allocator<char> >,class 
std::allocator<struct boost::sub_match<class 
std::_String_const_iterator<char,struct std::char_traits<char>,class 
std::allocator<char> > > > > &,class boost::basic_regex<char,struct 
boost::regex_traits<char,class boost::w32_regex_traits<char> > > const 
&,enum boost::regex_constants::_match_flags)" 
(??0?$perl_matcher@V?$_String_const_iterator@DU?$char_traits [EDITED] @D@std@@V?$allocator@D@2@@std@@V?$allocator@U?$ [EDITED] sub_match@V?$_String_const_iterator@DU?$char_traits@D@std@@ [EDITED] V?$allocator@D@2@@std@@@boost@@@2@U?$regex_traits@DV [EDITED] ?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@ [EDITED] @QAE@V?$_String_const_iterator@DU?$char_traits@D@std@@V [EDITED] ?$allocator@D@2@@std@@0AAV?$match_results@V?$_String_ [EDITED] const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@ [EDITED] std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@DU [EDITED] ?$char_traits@D@std@@V?$allocator@D@2@@std@@@boost@@ [EDITED] @2@@2@ABV?$basic_regex@DU?$regex_traits@DV?$w32_regex_t [EDITED] raits@D@boost@@@boost@@@2@W4_match_flags@regex_constants [EDITED] @2@@Z)
	VFSHandler.obj	
Any idea what is causing it? I had to compile boost for VC8 and I'm using it's libs.
Last edited by Licho on 23 May 2006, 16:15, edited 2 times in total.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

It's caused by the line
if (boost::regex_match(diritr->leaf(),regexpattern))

in system/filefunctions.h
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Nm, I solved it by using old version of boost (1.33) instead of latest stable (1.33_1) .. for the reasons beyong my comprehension this solved the problem..
Post Reply

Return to “Engine”