thanks, I found the error. it's not the fault of InitX11Draw(const char *dispname) itself, but rather an error in the function with the same name called by it. there is a superfluous "int" declaring a local variable with the same name as a global one, and this variable is responsible for storing the screen-number. this way the global screen-number is never defined (and luckily defaults to zero). I removed that "int" directive and it works!