This constructor won't be called when you do LIQUID *liq, since you aren't creating a LIQUID object at that time. When you do call the constructor, you don't get kinda many arguments. You get two arguments, since that's what your constructor takes. Notice that that means, in particular, that you will never get to set up your callback function, since that's not one of your arguments, and you will never get a chance to call your set-up function, since no more lines of your main program will ever execute (since you said that this function should run until shutdown).