Print to network printer from c++ code

Hello,
I have an OKI laser printer conneted to the network via WIFI.
I have set-up the printer on Ubuntu Mate 14.04.
I am able to print via e.g. Acrobat, lpr, etc.

However, the printer does not seem to be "mounted to a device such as “/dev/lp”. Thus the very simple printing using such device in an open method does not work.

I saw some hints of using the old C librar function popen(“lpr, …”, however, I could not manage to get this working in C++ code.

Any ideas, how I could accomplish simple printing out of a C++ program?

Thank you