Sure (and I have done that in the next version I'll release after another round of bleating) It's still a fault on the users part though.DougieLawson wrote:Surely it's not beyond the realms of sensibility to set a flag when wiringPiSetup() is run that you test before doing any initialisation. Second call to wiringPiSetup() effectively becomes a NOP (with a branch to function exit, as the job's already done).[email protected] wrote:Yes, it is a fatal error to call wiringPiSetup() more than once in a program. You need to move the setup call to outside your main loop.gauravsharma0190 wrote: in this code my gui window pop up and i am able to press the button but only 1 time only .
if i again press button ,My gui close and a message pop up says
you must only call this once per programe run.this is fatal error.
Joined: Tue Oct 28, 2014 12:06 pm
The reason is that I'm fed-up with people emailing me telling me wiringPi is broken when they repeatedly call the setup code in a loop and their program subsequently runs out of file handles some time later...