]> git.sesse.net Git - ccbs/blobdiff - bigscreen/ccbs_bigscreen.cpp
Add pq++ dependency, start code for just connecting.
[ccbs] / bigscreen / ccbs_bigscreen.cpp
index 778720f9e90aa97037dcb67db3ce1dc4acbad52a..dc31c06c2e1096e63748aa9eeb2c7a3e7a2accd8 100644 (file)
@@ -1,10 +1,18 @@
-#include <stdio.h>
+#include <cstdio>
 #include <unistd.h>
+#include <pqxx/pqxx>
 #include "glwindow.h"
 
 int main(int argc, char **argv)
 {
        GLWindow glw("CCBS bigscreen", 800, 600, 32, false, 16, -1);
-       sleep(5);
+       try {
+               pqxx::connection conn("dbname=ccbs host=sql.samfundet.no user=ccbs password=GeT|>>B_");
+               pqxx::transaction<> t(conn, "trx");
+       } catch (const std::exception &e) {
+               std::fprintf(stderr, "Exception: %s\n", e.what());
+               exit(1);
+       }
+       
        return 0;
 }