Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: nuggetbram on August 28, 2014, 10:12:21 AM



Title: C++ CG/SGminer API calls?
Post by: nuggetbram on August 28, 2014, 10:12:21 AM
I'm in the process of screwing around trying to learn c++ in a bitcoin related environment. I've so far made, in QT, a gui application to essentially write the batch files for me. Now all I need is for it to display rpc/api things (speed, a/r etc...).

I've got no idea how to do this, other than it requires JSON.

Could someone show me some example code or something along those lines? I've found python and c# examples but I'm not really sure how to convert those...

I'm looking for something that I can use as a string (so I can set a label to it easily :)  )

Thanks,

nuggetbram



Title: Re: C++ CG/SGminer API calls?
Post by: Remember remember the 5th of November on August 28, 2014, 12:35:12 PM
CGminer includes a file called api.c, it exports some functions you use in your project to call the cgminer APIs, if you want to do it yourself you will need to learn about sockets.