Skip to content

Instantly share code, notes, and snippets.

@kratzert
Created June 30, 2017 14:16
Show Gist options
  • Save kratzert/d77700ceb1325a89374238cdf652ddb9 to your computer and use it in GitHub Desktop.
Save kratzert/d77700ceb1325a89374238cdf652ddb9 to your computer and use it in GitHub Desktop.
#include <qgsapplication.h>
#include <qgsvectorlayer.h>
int main(int argc, char ** argv) {
QgsApplication app(argc, argv, true);
puts ("im alive");
QgsVectorLayer layer ("/home/fishtv/workspace/qgis_test/gre1mio.shp", "a name I like", "ogr");
if (layer.isValid())
printf ("Found %d", (int) layer.featureCount());
else
puts ("oh");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment