Library interface help

Help
K4ELO
2012-11-19
2013-01-15
  • K4ELO
    K4ELO
    2012-11-19

    Hi all, I don't know C and I'm a newbie at C++ (bad combination, I know), but I have a logger written in C++ that works well and I would like to add hamlib support.  I have successfully linked the hamlib library to my program but I am really confused as to how to make it work.  The C syntax is rather confusing to me.  Can anyone please give me some pointers as to how to start?

    73 and thanks,
    Wayne
    K4ELO

     
  • Nate Bargmann
    Nate Bargmann
    2012-11-19

    Hi Wayne.

    I studied C++ a year ago and have a basic understanding of it.  C++ is a super-set of C of sorts.  C has no concept of operator overloading or functions with multiple signatures and certainly not classes or inheritance.  Essentially, in C functions are called with the needed parameter list and then any return value is processed.

    I know that SO2SDR is a C++ project using Hamlib's C interface:

    https://github.com/n4ogw/so2sdr

    A rather simple example to help you get started is the testrig.c file in the Hamlib tests directory.

    Hope that helps a bit.

    73, de Nate, N0NB

     
  • K4ELO
    K4ELO
    2012-11-19

    Hi Nate and thanks for your help.  SO2SDR is quite useful to me as I wrote my logger using Qt as well.  But I can see that you guys are certainly better developers than me - lots left to learn.  That should be enough to help me get hamlib running.

    73
    Wayne
    K4ELO

     
  • Nate Bargmann
    Nate Bargmann
    2012-11-19

    SO2SDR is primarily Tor's (N4OGW) project.  I jumped in last spring and added a few things, but haven't gotten back to it, focusing on Hamlib instead.  There were also a couple of replies on the Hamlib Developer mailing list as well.