Compiling spring (mingw and visual studio 7/8)
Moderator: Moderators
-
- Posts: 436
- Joined: 26 Aug 2004, 08:11
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.
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.
In the MSDN library it says: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.
"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."
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.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
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.
-
- Posts: 436
- Joined: 26 Aug 2004, 08:11
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.
Re: Having trouble with libc.lib
I too have this LIBC.lib error. what did I forgot to do? forgive my noobz question. Any solution?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.
Re: Having trouble with libc.lib
Step 1: Install the PSDK.furyhawk wrote:I too have this LIBC.lib error. what did I forgot to do? forgive my noobz question. Any solution?
Step 2: Follow the instructions here http://msdn.microsoft.com/vstudio/expre ... usingpsdk/
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?
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.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.
That message went away when I did this http://msdn.microsoft.com/vstudio/expre ... usingpsdk/
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 :)
.\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 :)
Where are you getting the source? That problem was fixed in the SVN a while ago.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.
Just replace every mention of afxres.h with winresrc.h
That allow you to compile spring without the "pro" edition of Visual Studio.
not from svn, from the 0.70b3 source.
VS2005 doesn't allow down casting of const char...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.
Try either 0.71b1 or SVNfuryhawk wrote:not from svn, from the 0.70b3 source.
VS2005 doesn't allow down casting of const char...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.
I'm trying to build subversion version using visual studio 2005, and I have last one linker problem:
Any idea what is causing it? I had to compile boost for VC8 and I'm using it's libs.
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
Last edited by Licho on 23 May 2006, 16:15, edited 2 times in total.