Sign in to follow this  
noatom

Can someone make this VS 2010?

Recommended Posts

wicked357    2424

I'm confused why don't you just create a new project. Import the files and build the project. If anything arises VS 2010 will let you know on the build and you can debug and fix from there, also you post your warning / errors and I am sure this community would love to assist you.

Share this post


Link to post
Share on other sites
noatom    927

as the code is designed for linux,is includes pthread.h ...what do i do on windows?

Edited by noatom

Share this post


Link to post
Share on other sites
noatom    927

Ok...now I really got stuck....

 

 

There are so many defines that it says it can't find but they are included...

 

And the void pointers...they should be cast into something since c++ is more restrictive...but cast them into what?!

1>------ Build started: Project: test, Configuration: Debug Win32 ------
1>  util.c
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(100): warning C4133: 'function' : incompatible types - from 'time_t *' to 'tm *'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(100): error C2198: 'localtime_s' : too few arguments for call
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(100): warning C4047: '=' : 'tm *' differs in levels of indirection from 'errno_t'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(150): error C2036: 'void *' : unknown size
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(151): error C2036: 'void *' : unknown size
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(162): warning C4018: '>' : signed/unsigned mismatch
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(166): error C2036: 'const void *' : unknown size
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(180): warning C4244: '=' : conversion from 'curl_off_t' to 'size_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(183): warning C4244: '+=' : conversion from 'curl_off_t' to 'size_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(186): warning C4244: '=' : conversion from 'curl_off_t' to 'size_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(211): error C2036: 'void *' : unknown size
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(217): error C2036: 'void *' : unknown size
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(232): warning C4013: 'strcasecmp' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(362): error C2146: syntax error : missing ')' before identifier 'PACKAGE_NAME'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(362): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(380): warning C4013: 'strncasecmp' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(456): warning C4018: '<' : signed/unsigned mismatch
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(563): warning C4244: '=' : conversion from 'double' to 'uint64_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(849): error C2146: syntax error : missing ')' before identifier 'PACKAGE_NAME'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(849): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(851): error C2146: syntax error : missing ')' before identifier 'PACKAGE_NAME'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(851): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(896): warning C4244: '=' : conversion from 'json_int_t' to 'int', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1092): warning C4244: '=' : conversion from 'json_int_t' to 'int', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1119): error C2065: 'PACKAGE_NAME' : undeclared identifier
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1119): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1119): warning C4024: 'json_string' : different types for formal and actual parameter 1
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1119): error C2143: syntax error : missing ')' before 'string'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1222): warning C4013: 'typeof' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1222): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1222): warning C4552: '!=' : operator has no effect; expected operator with side-effect
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1227): error C2143: syntax error : missing ')' before '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1227): error C2143: syntax error : missing '{' before '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1227): error C2059: syntax error : '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1227): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1228): error C2143: syntax error : missing ')' before '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1228): error C2143: syntax error : missing '{' before '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1228): error C2059: syntax error : '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1228): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1230): error C2059: syntax error : ','
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1230): error C2143: syntax error : missing ')' before 'constant'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1230): error C2143: syntax error : missing '{' before 'constant'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1230): error C2059: syntax error : 'constant'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1231): error C2371: 'free' : redefinition; different basic types
1>          c:\program files (x86)\microsoft visual studio 12.0\vc\include\stdlib.h(641) : see declaration of 'free'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1232): error C2059: syntax error : '}'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1246): warning C4013: 'tq_freezethaw' undefined; assuming extern returning int
1>  sha2.c
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(587): error C2146: syntax error : missing ';' before identifier '__attribute__'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(587): warning C4013: '__attribute__' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(587): warning C4013: 'aligned' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(588): error C2146: syntax error : missing ';' before identifier '__attribute__'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(589): error C2146: syntax error : missing ';' before identifier '__attribute__'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(590): error C2146: syntax error : missing ';' before identifier '__attribute__'
1>  scrypt.c
1>  cpu-miner.c
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(315): error C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          c:\program files (x86)\microsoft visual studio 12.0\vc\include\stdio.h(356) : see declaration of 'sprintf'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(409): warning C4013: 'gettimeofday' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(555): warning C4244: 'function' : conversion from 'time_t' to 'uint32_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(636): warning C4018: '<' : signed/unsigned mismatch
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(743): warning C4244: '*=' : conversion from 'double' to 'int64_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(749): warning C4244: '=' : conversion from 'int64_t' to 'uint32_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1002): error C2065: 'PACKAGE_STRING' : undeclared identifier
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1100): warning C4013: 'strncasecmp' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1230): warning C4013: 'getopt' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1235): error C2065: 'optarg' : undeclared identifier
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1235): warning C4047: 'function' : 'char *' differs in levels of indirection from 'int'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1235): warning C4024: 'parse_arg' : different types for formal and actual parameter 2
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1237): error C2065: 'optind' : undeclared identifier
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1239): error C2065: 'optind' : undeclared identifier
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Edited by noatom

Share this post


Link to post
Share on other sites
//Lumia    650

Hi again,

 

my suspicion is that you are not compiling the code with the MinGW compiler as mentioned in the Readme of the repository.

If so then the built-in VS compiler will try to do the job.

Referring to this Thread (sorry for cross-site linking) http://stackoverflow.com/questions/8525470/porting-c-compilation-from-mingw-to-visualstudionmake there can be several situations that are not covered in the standard or differ depending on the standard that is used.

 

So if you aren't compiling with MinGW as it is recommended please get active and do so.

You can ignore my post if you're already using MinGW.

 

Share this post


Link to post
Share on other sites
noatom    927

so why do you think i asked in the first post for help...? maybe because i got stuck in the hurdles of mingw? Then i had 2 posts suggesting me to use visual studio,which I did...

Share this post


Link to post
Share on other sites
jjd    2140

 

Ok...now I really got stuck....

 

 

There are so many defines that it says it can't find but they are included...

 

And the void pointers...they should be cast into something since c++ is more restrictive...but cast them into what?!

1>------ Build started: Project: test, Configuration: Debug Win32 ------
1>  util.c
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(100): warning C4133: 'function' : incompatible types - from 'time_t *' to 'tm *'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(100): error C2198: 'localtime_s' : too few arguments for call
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(100): warning C4047: '=' : 'tm *' differs in levels of indirection from 'errno_t'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(150): error C2036: 'void *' : unknown size
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(151): error C2036: 'void *' : unknown size
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(162): warning C4018: '>' : signed/unsigned mismatch
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(166): error C2036: 'const void *' : unknown size
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(180): warning C4244: '=' : conversion from 'curl_off_t' to 'size_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(183): warning C4244: '+=' : conversion from 'curl_off_t' to 'size_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(186): warning C4244: '=' : conversion from 'curl_off_t' to 'size_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(211): error C2036: 'void *' : unknown size
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(217): error C2036: 'void *' : unknown size
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(232): warning C4013: 'strcasecmp' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(362): error C2146: syntax error : missing ')' before identifier 'PACKAGE_NAME'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(362): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(380): warning C4013: 'strncasecmp' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(456): warning C4018: '<' : signed/unsigned mismatch
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(563): warning C4244: '=' : conversion from 'double' to 'uint64_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(849): error C2146: syntax error : missing ')' before identifier 'PACKAGE_NAME'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(849): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(851): error C2146: syntax error : missing ')' before identifier 'PACKAGE_NAME'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(851): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(896): warning C4244: '=' : conversion from 'json_int_t' to 'int', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1092): warning C4244: '=' : conversion from 'json_int_t' to 'int', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1119): error C2065: 'PACKAGE_NAME' : undeclared identifier
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1119): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1119): warning C4024: 'json_string' : different types for formal and actual parameter 1
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1119): error C2143: syntax error : missing ')' before 'string'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1222): warning C4013: 'typeof' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1222): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1222): warning C4552: '!=' : operator has no effect; expected operator with side-effect
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1227): error C2143: syntax error : missing ')' before '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1227): error C2143: syntax error : missing '{' before '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1227): error C2059: syntax error : '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1227): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1228): error C2143: syntax error : missing ')' before '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1228): error C2143: syntax error : missing '{' before '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1228): error C2059: syntax error : '&'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1228): error C2059: syntax error : ')'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1230): error C2059: syntax error : ','
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1230): error C2143: syntax error : missing ')' before 'constant'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1230): error C2143: syntax error : missing '{' before 'constant'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1230): error C2059: syntax error : 'constant'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1231): error C2371: 'free' : redefinition; different basic types
1>          c:\program files (x86)\microsoft visual studio 12.0\vc\include\stdlib.h(641) : see declaration of 'free'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1232): error C2059: syntax error : '}'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\util.c(1246): warning C4013: 'tq_freezethaw' undefined; assuming extern returning int
1>  sha2.c
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(587): error C2146: syntax error : missing ';' before identifier '__attribute__'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(587): warning C4013: '__attribute__' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(587): warning C4013: 'aligned' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(588): error C2146: syntax error : missing ';' before identifier '__attribute__'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(589): error C2146: syntax error : missing ';' before identifier '__attribute__'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\sha2.c(590): error C2146: syntax error : missing ';' before identifier '__attribute__'
1>  scrypt.c
1>  cpu-miner.c
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(315): error C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          c:\program files (x86)\microsoft visual studio 12.0\vc\include\stdio.h(356) : see declaration of 'sprintf'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(409): warning C4013: 'gettimeofday' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(555): warning C4244: 'function' : conversion from 'time_t' to 'uint32_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(636): warning C4018: '<' : signed/unsigned mismatch
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(743): warning C4244: '*=' : conversion from 'double' to 'int64_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(749): warning C4244: '=' : conversion from 'int64_t' to 'uint32_t', possible loss of data
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1002): error C2065: 'PACKAGE_STRING' : undeclared identifier
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1100): warning C4013: 'strncasecmp' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1230): warning C4013: 'getopt' undefined; assuming extern returning int
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1235): error C2065: 'optarg' : undeclared identifier
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1235): warning C4047: 'function' : 'char *' differs in levels of indirection from 'int'
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1235): warning C4024: 'parse_arg' : different types for formal and actual parameter 2
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1237): error C2065: 'optind' : undeclared identifier
1>c:\users\enjoydrama\documents\visual studio 2013\projects\test\test\cpu-miner.c(1239): error C2065: 'optind' : undeclared identifier
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 

So, this is not a C++ library but a C library. I believe there is a project setting in visual studio that allows you to 'compile as C'.

 

-Josh

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this