JWASM Linux gtk Example (32bit)

Started by jcfuller, October 31, 2009, 06:15:39 PM

Previous topic - Next topic

ecube

For the complete linux noobs like me, this is how I got their GTK example to work on a fresh ubuntu(latest version) install

1) install GTK by going to applications->accessories->terminal and paste
sudo aptitude install gnome-core-devel build-essential

2) after that finishes installing, grab JWASM at http://sourceforge.net/projects/jwasm/files/JWasm%20Linux%20binary/JWasm200bl.zip/download

I downloaded to my desktop, right clicked and extracted there

3)go into the JWASM folder, right click on the jwasm file->properties and set its permissions to "allow executable"

5)copy the above example into a file you created called gtk01.asm

this parts optional but I did it for easy compiling(similar to a batch on windows)
4) create a new file and paste the following in it

#!/bin/sh
./JWASM -elf -zcw -Fo=gtk01.o gtk01.asm
ld -s -o gtk01 gtk01.o -I/lib/ld-linux.so.2 `pkg-config --libs gtk+-2.0`


5)right click the file and make it executable like you did the jwasm file, now you can just run this either in a shell via ./whateverunamed it or you can open it and ubuntu will ask if you want to execute or view.

result


jcfuller

I don't plan on doing any low level stuff with jwasm. I  dislike "c" and all the {};;; crap so I figured I'd give it a try using the available Linux libraries.
For info (Ubuntu) go into system->Administration->Synaptic Package Manager and install devhelp. Lots of good stuff.
I use Geany as an editor also available from Synaptic Package Manager.
James

ecube

can you make static link libraries for linux using jwasm or similar? if so how?