03-13-2010, 05:07 AM
Pages: 1 2
03-13-2010, 05:38 AM
(03-12-2010 07:58 PM)strykermikado Wrote: [ -> ]I keep getting "error C2664: 'CreateDirectoryW' : cannot convert parameter 1 from 'const char *' to 'LPCWSTR'". Nothing I do will fix it. Plus there are a few more errors that produce when I try to compile rev620.
Code:
1>..\..\..\..\..\Desktop\Minecraft\Compile Server\branch\Server.cpp(1976) : error C2664: 'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::append(const std::basic_string<_Elem,_Traits,_Ax> &)' : cannot convert parameter 1 from 'WCHAR [260]' to 'const std::basic_string<_Elem,_Traits,_Ax> &'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>,
1> _Ax=std::allocator<char>
1> ]
1> Reason: cannot convert from 'WCHAR [260]' to 'const std::basic_string<_Elem,_Traits,_Ax>'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>,
1> _Ax=std::allocator<char>
1> ]
1> No constructor could take the source type, or constructor overload resolution was ambiguous
1>..\..\..\..\..\Desktop\Minecraft\Compile Server\branch\Server.cpp(1990) : error C2664: 'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::append(const std::basic_string<_Elem,_Traits,_Ax> &)' : cannot convert parameter 1 from 'WCHAR [260]' to 'const std::basic_string<_Elem,_Traits,_Ax> &'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>,
1> _Ax=std::allocator<char>
1> ]
1> Reason: cannot convert from 'WCHAR [260]' to 'const std::basic_string<_Elem,_Traits,_Ax>'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>,
1> _Ax=std::allocator<char>
1> ]
1> No constructor could take the source type, or constructor overload resolution was ambiguous
This error could be fixed by adding adding the L prefix before the first argument of CreateDirectoryW, but I don't think this is the problem.
I've managed to compile the source code of the stable release by creating a new Empty Project (not a Console App). You will need to add both libs and the include path for zlib, of course.
But I'd sugest you to use the SVN version, it comes with a VC project, you just need to open and compile...
03-13-2010, 05:44 AM
See I had actually tried that but to no avail. I have included the zlibs and what not. When I changed the project over to multi-byte char set, this error went away and then gave me an error saying I need the winsock libs which are only come from the sdk from microsoft that is much bigger then I care to download.
03-13-2010, 06:05 AM
@TheJCS: your right, the vcprojects do compile... I'm certain I tried it/them a couple of days ago to no avail.
Thanks
Thanks
03-13-2010, 03:30 PM
paste in the lines of code that are throwing the errors. You probably just need to add "(LPCWSTR)" in front of the value that it can't convert.
dag and Twd have (or had) automatic type casting enabled for their projects (it is disabled by default) which lets their compiler make the necessary adjustments. This creates runnable code for them, but it will fail for people who dont have auto type casting enabled.
dag and Twd have (or had) automatic type casting enabled for their projects (it is disabled by default) which lets their compiler make the necessary adjustments. This creates runnable code for them, but it will fail for people who dont have auto type casting enabled.
Pages: 1 2