A small wrapper to allow writing Qt / C++ "scripts" without needing to create a project
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
test
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION

README.rdoc

fooq

fooq lets you run Qt / C++ code as if it was a script. You can use, for example:

#!/usr/bin/fooq

qDebug() << "fooq!";

And it will create a temp directory, build and run the script already including and linking to QtCore. You can also run it directly on the command line:

$ fooq
qDebug() << "fooq!";
^D
"fooq!"
$

It automagically picks up on previously declared functions, classes, structs, includes and whatnot and won't munge them into your main method. So this works fine:

#!/usr/bin/fooq

static void foo()
{
  qDebug() << "fooq!";
}

foo();

I found myself creating a lot of one-off 5 line projects to test things, and this has saved me a good deal of time in testing C++ one-liners or doing quick processing tasts that Qt is well suited to.

Copyright

Copyright © 2010 Scott Wheeler. See LICENSE for details.