How do I add the GPIO module to app

Despite decades of programming and hardware design, I am new to Xojo, linux, and Pi though I did extensive apps in VB3. I am trying to use the GPIO on a Pi3. I have wiringpi on the pi, but I can’t get the simple led blink to compile - nummerous item does not exist errors.

I am at

To add the GPIO library to your projects, download it from GitHub, open the project and select the WiringPiXojo module in the Navigator. You can then copy and paste it to your own Xojo projects.

I have never used github before. ‘download it from GitHub’ - I have downloaded the .zip - I have no clue how to ‘open the project and select the WiringPiXojo module in the Navigator’. Once I can do that - where do I ‘You can then copy and paste it to your own Xojo projects.’

I unzipped it and in the GPIO folder opened the LCD project? code in Xojo IDE - I cannot see anything…

Yes I am an idiot, but can someone help me to get a stupid LED to flash. I need stupid idiot instruction.


I have loaded the GPIO project and have copied the methods but still get errors, obviously have not yet loaded the MODULE…


OK so I copied and pasted the GPIO module into my app. All of the errors disappeared except the pragma errors. I can delete the offending error causing lines, but that does not seem right.


The pragma errors should only appear if you try to run/build for anything but the Pi (Linux/ARM).

Check the examples for complete projects:
Examples/Platform Support/Linux/Pi (or similar — not at my computer right now).

You’re almost there… I’ve had the pragma errors show up in a couple of instances:

  1. I forget to set the build target (Linux ARM)
  2. Run on the host (non-pi) instead of remote debug to the Pi.

Sorry in advance for the verbal diarrhea, but won’t be posting for a long time I expect. I can’t imagine what its like for a complete noobie.

Thanks, I’ve compiled so many times, I’m sure I would not have missed to set it to linux - arm32. I followed the example in I kept pausing it but the screen shots never quite matched what I got.

I got the remote debugger unzipped on the pi, then did a build making sure linux - arm 32 was selected and it gave me ‘windows can’t do remote debug’, and ‘can’t link to …’ Gave up with remote debug. I have transferred a few hello type apps to the pi desktop folder with Filezilla - not the highest build folder, but the one that contains the lib folder and the app itself.

Double cliking the folder opened the filemanager went to the app and tried to start the app. It kept asking me what I wanted to open it with. I right cliked the app and changed all the permissions properties to ANYONE. Then it aks me if I want to execute it and it works. Yesterday I got to a permissins dialog that allowed me to set it as an executable file (none of the ‘who’ permissions - but don’t seem to able to get there again.

Why doesn’t xojo set it to an app tso that it can be run just by clicking it on the pi. - it’s an app; why do I have to set the who permissions?

This all makes me mad. 6 month ago when I first got the pi and xojo, I created an app to play an mp4 file on the pi in about 15-30 minutes. I used a thumb drive to port the app to the pi, but can’t rember if I moved it to the pi SD card. I’m sure all I would have done was double click the app in the file manager. I don’t remember changing permissions, but maybe I did.

Anyway thanks, guys. I’ll just bang on through it all. I am completely self taught, program in a few languages, started in the late 70’s in assembler on an intel 8080 - no forums or internet with tutorial videos back then. My first program (in self taught 8080 assembler) ran about 100 dedicated processes handling 60 telephone lines, 64 didital recorders, and 18 transmitters (the world’s first uP based radio paging machine - for old fashioned belt worn beepers). I wrote the very simple OS to execute as a dedicated function interpreter. It ran at 300Khz due the 3 x 3 foot busses, but still managed to I/F to 5 dumb serial terminals (with their own apps like searching the 1MB ram database, and real time traffic displays) and service all the hardware I/O sequentially in a 1/30 of a second loop. All in 48K of program space and 16K data.

I’ve avoided Linux like the plague, but just could not resist the Pi for cost effective control applications. There are problems with its I2C and header serial port and I’m planning to do a bit banging I2C driver just using the digital pin I/O of wiringpi.

I hate Linux … but Xojo is great, just a lot of advances to get my head around from VB3 25 years ago.


You say you unzipped the remote debugger on the PI, but did you set it running?

Hi Dave.
Xojo apps work great on the Pi, when all the hell of the OS is eventually mastered, and by mastered i mean pure luck and following the online ‘help’ offered by a million people who think ‘open sourced’ and ‘free apps’ are a good idea.

its Linux which is seriously flawed not you.

i had to go through all the same ridiculous hoops too for a commercial product.
that product is now running on a bespoke OS i wrote in a piece of hardware i designed.
i found out i do not have enough hours in the day to make any money from a Pi based solution nor the will to waste hours and hours typing stupid commands into a shell.

What a waste of a years development, never again will i use Pi or linux for anything commercial.

If anyone reading this loves linux then please do not think my post is about bashing that OS, and no that was not meant to be a pun.

Frustration brings a lot of us to this forum. Even rants are pretty common.

I’ve been running Xojo projects on Pi units for over a year with all sorts of interfaces…
push buttons, LEDs, I2C LED Displays, 1Wire Temperature interface, 2.8" touchscreen.

So, the same question as @James Dooley:
Did you run the remote debugger on the Pi after you unzipped it?
The remote stub handles the file transfer, unpacks, then runs the executable for you.
Xojo likes to issue a ‘Malicious Termination’ message if the remote debugger isn’t running on your target.

Which Xojo version are you using? Recent versions Run Remote from windows just fine.

Building on Mac or Linux for the Pi will set the permissions correctly, they’re both unix based filesystems.
Depending on the transfer to the Pi, the file ‘owner’ may need to be fixed.
Windows directories don’t have the equivalent permission ‘bits’ so you can’t directly copy the ‘Build’ folders without fixing them after transferring. Usually you only need to fix the app/executable file to allow ‘Execute’ permissions.

Building a Mac app works on any host because it’s all in one file, and Xojo can build the app file with all of the correct bits inside.

I started about the same time with 6502 assembler drivers for 80 column adapters on the Apple II so I could build a really clunky Word Processor that the publisher claims sold about 30 copies. I still have a ‘souvenir’ copy, nifty box, user guide, and useless diskettes. They tried moving on to the original 64k IBM-PC when it came out, but never made any headway. I ended up moving on to General Accounting systems on Basic/4 mini computers, which ended up moving to and running on various Unix systems in the 80’s. I got to know Unix very well, so Linux was an awesome, free, no-brainer for me.
I did a couple of Visual Basic projects that utilized a Linux file server on another project.
Then I discovered RealBasic/RealStudio/Xojo which allowed me to build my projects on a lot of targets.