commit 2243e528b530ca3352e23d82fe232e61cd62747b
Author: David Sorber <david.sorber@gmail.com>
Date:   Sat Jul 14 14:17:40 2018 -0400

    Started making a simple test program.

diff --git a/software/packJPG_library/lib_src/CMakeLists.txt b/software/packJPG_library/lib_src/CMakeLists.txt
index 2a6a68c..ea63575 100644
--- a/software/packJPG_library/lib_src/CMakeLists.txt
+++ b/software/packJPG_library/lib_src/CMakeLists.txt
@@ -1,7 +1,9 @@
 project("packJPG")
 cmake_minimum_required(VERSION 3.2)
 
-include_directories(.)
+set(CMAKE_CXX_STANDARD 14)
+
+include_directories(..)
 
 set(packjpg_sources
     ../aricoder.cpp
@@ -15,3 +17,14 @@ add_definitions("-march=native")
 
 add_library(packjpg SHARED
     ${packjpg_sources})
+    
+
+
+find_package(Boost 1.54.0       
+             REQUIRED 
+             COMPONENTS filesystem)  
+
+add_executable(packjpg_simple
+                ../bin/packjpg_simple.cc)
+                
+target_link_libraries(packjpg_simple ${Boost_LIBRARIES} packjpg stdc++fs)
diff --git a/software/packJPG_library/lib_src/bin/packjpg_simple.cc b/software/packJPG_library/lib_src/bin/packjpg_simple.cc
new file mode 100644
index 0000000..84adfa6
--- /dev/null
+++ b/software/packJPG_library/lib_src/bin/packjpg_simple.cc
@@ -0,0 +1,52 @@
+#include <cstdint>
+#include <fstream>
+#include <iostream>
+#include <vector>
+
+#include <boost/filesystem.hpp>
+
+#include "../packjpg.h"
+
+namespace bfs = boost::filesystem;
+
+int main(int argc, char** argv)
+{
+    std::cout << "packJPG Simple Test Utility" << std::endl;
+    std::cout << "  [" << packJPG::pjglib_version_info() << "]\n" << std::endl;    
+    
+    // Verify that input was provided
+    if (argc < 2)
+    {
+        std::cerr << "ERROR: please provide an input file\n" << std::endl;
+        return -1;
+    }
+    char* file_path = argv[1];
+    
+    // Verify that input is a path to a file
+    if (! bfs::is_regular_file(file_path))
+    {
+        std::cerr << "ERROR: \"" << file_path << "\" is not a file\n" << std::endl;
+        return -1;
+    }    
+    
+    uint32_t file_size = bfs::file_size(file_path);
+    std::cout << "File size: " << file_size << std::endl;
+    std::vector<char>* file_buffer = new std::vector<char>(file_size);
+    
+    std::ifstream input_stream(file_path, std::ios::binary | std::ios::in);
+    if (! input_stream)
+    {
+        std::cerr << "ERROR: unable to read from \"" << file_path << "\"" 
+                  << std::endl;
+        return -1;
+    }
+    
+    input_stream.read(file_buffer->data(), file_size);
+    input_stream.close();
+    
+    //~ packJPG instance = packJPG();
+    
+    delete file_buffer;
+    
+    return 0;
+}
diff --git a/software/packJPG_library/lib_src/packjpg.cpp b/software/packJPG_library/lib_src/packjpg.cpp
index 58bcc16..61077cc 100644
--- a/software/packJPG_library/lib_src/packjpg.cpp
+++ b/software/packJPG_library/lib_src/packjpg.cpp
@@ -279,10 +279,7 @@ packJPG by Matthias Stirner, 01/2016
 #include <stdexcept>
 #include <vector>
 
-#include "bitops.h"
-#include "aricoder.h"
-#include "pjpgtbl.h"
-#include "dct8x8.h"
+
 
 
 #include "packjpg.h"
diff --git a/software/packJPG_library/lib_src/packjpg.h b/software/packJPG_library/lib_src/packjpg.h
index 0589f8d..f721f76 100644
--- a/software/packJPG_library/lib_src/packjpg.h
+++ b/software/packJPG_library/lib_src/packjpg.h
@@ -1,6 +1,10 @@
 #ifndef PACKJPG_H
 #define PACKJPG_H
 
+#include "bitops.h"
+#include "aricoder.h"
+#include "pjpgtbl.h"
+#include "dct8x8.h"
 
 #define MEM_ERRMSG  "out of memory error"
 #define FRD_ERRMSG  "could not read file / file not found: %s"
