Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Can someone make this VS 2010?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
12 replies to this topic

#1 noatom   Members   -  Reputation: 785

Like
-3Likes
Like

Posted 19 December 2013 - 12:02 PM

https://github.com/pooler/cpuminer

 

Can someone please turn that into a visual studio 2010 project? I've been trying to somehow use mingw but i got caught in it and i just uninstalled the whole thing....



Sponsor:

#2 ApochPiQ   Moderators   -  Reputation: 16414

Like
6Likes
Like

Posted 19 December 2013 - 12:21 PM

Why should we do your work for you?

 

Setting up a new project isn't that hard. I suggest you try it, as a learning experience.



#3 wicked357   Members   -  Reputation: 1285

Like
1Likes
Like

Posted 19 December 2013 - 12:26 PM

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.



#4 noatom   Members   -  Reputation: 785

Like
-2Likes
Like

Posted 19 December 2013 - 12:34 PM

...because just importing everything creates a zillion janson lib errors...



#5 ApochPiQ   Moderators   -  Reputation: 16414

Like
0Likes
Like

Posted 19 December 2013 - 12:42 PM

Then you didn't set up something correctly. Post the specific errors and we can help troubleshoot.



#6 //Lumia   Members   -  Reputation: 531

Like
6Likes
Like

Posted 19 December 2013 - 12:51 PM

Hi there,

 

if I hit the link in your initial post I am redirected to the projects page on github.

There is a Readme on the lower part of the site. It says clearly that this project has external dependencies including "libcurl" and "jansson".

Furthermore there are Links offered so you can go there and download the libs mentioned above:

So import the project and download these 2 libs. After that you have to link against them. You are doing this by changing your project properties.

If you have finished this steps everything should be fine and you are ready to build the project.

 

I hope this helps you out.



#7 noatom   Members   -  Reputation: 785

Like
0Likes
Like

Posted 19 December 2013 - 01:46 PM

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


Edited by noatom, 19 December 2013 - 02:26 PM.


#8 wicked357   Members   -  Reputation: 1285

Like
1Likes
Like

Posted 19 December 2013 - 02:37 PM

http://sourceware.org/pthreads-win32/



#9 noatom   Members   -  Reputation: 785

Like
0Likes
Like

Posted 19 December 2013 - 02:39 PM

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, 19 December 2013 - 02:41 PM.


#10 //Lumia   Members   -  Reputation: 531

Like
1Likes
Like

Posted 19 December 2013 - 03:37 PM

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.

 



#11 noatom   Members   -  Reputation: 785

Like
-2Likes
Like

Posted 20 December 2013 - 11:47 AM

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...



#12 jjd   Crossbones+   -  Reputation: 2122

Like
1Likes
Like

Posted 20 December 2013 - 12:55 PM

 

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


--www.physicaluncertainty.com
--linkedin
--irc.freenode.net#gdnet


#13 Bacterius   Crossbones+   -  Reputation: 9304

Like
5Likes
Like

Posted 22 December 2013 - 01:11 AM


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

 

Yes, it's /Tc (compared to /Tp for C++). Still, if the library was written in C, designed for GCC, and not written with portability to other compilers in mind, it's likely going to suck big time porting it over to MSVC. More cost-effective to just use mingw IMHO. It takes some setting up but once it works it behaves pretty much the same as if you were on Linux.

 

The bottom line is, C was designed to be portable, but it was determined shortly after that a C program using only the standard libraries was not always very useful. And not everyone ended up using cross-platform libraries to do the stuff not covered by the standard library. And if that is not the case, you are looking at either using an emulation layer (e.g. cygwin or mingw) or at a complete rewrite of all the parts that aren't offered by visual studio.

 

To start with, the assembly files (which are pretty much the heart of the cpuminer project) are a complete non-starter on MSVC. It cannot deal with them. You need to install NASM (or another assembler), convert these assembly files to NASM format (which doesn't look too hard in this situation, though) and then set up a custom build rule in Visual Studio to send those .S files to NASM, otherwise it will just ignore them. Or, of course, you could just use mingw, which handles it out of the box.

 

So overall it's up to you - do you want to jump through the hoops to make the code work using Microsoft's compiler (which may or may not even be possible in a reasonable timescale), or do you prefer to use the recommended and tested compiler and following the instructions on the project's readme file, and asking more specific questions if you get stuck on any of these steps?


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS