Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compiling minerCPP
03-13-2010, 05:07 AM
Post: #11
RE: Compiling minerCPP
Twdtwd: what compiler do you use?
Visit this user's website Find all posts by this user
03-13-2010, 05:38 AM
Post: #12
RE: Compiling minerCPP
(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...
Find all posts by this user
03-13-2010, 05:44 AM
Post: #13
RE: Compiling minerCPP
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.
Find all posts by this user
03-13-2010, 06:05 AM
Post: #14
RE: Compiling minerCPP
@TheJCS: your right, the vcprojects do compile... I'm certain I tried it/them a couple of days ago to no avail.

Thanks
Visit this user's website Find all posts by this user
03-13-2010, 03:30 PM
Post: #15
RE: Compiling minerCPP
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.
Find all posts by this user


Forum Jump:



Powered By MyBB, © 2002-2026 MyBB Group | ORANGE ACCENT | By Kyle M at cmybb.com
Thanks to matvei.org for hosting and helping with our site!