Disable command line args on Windows
It seems argp doesn't work on Windows, so we can disable it for now.
This commit is contained in:
		
							parent
							
								
									16a7ff8ee1
								
							
						
					
					
						commit
						735e27ac53
					
				| 
						 | 
				
			
			@ -8,6 +8,7 @@ const char* argp_program_version =
 | 
			
		|||
	"available at <git://git.epicalert.xyz/facecam2d.git> or the\n"
 | 
			
		||||
	"GitLab mirror at <https://gitlab.com/epicalert/facecam2d.git>.";
 | 
			
		||||
 | 
			
		||||
#ifndef _WIN64
 | 
			
		||||
const struct argp_option options[] = {
 | 
			
		||||
	//name, key, arg, flags, doc, group
 | 
			
		||||
	{"haar-cascade",	0x00,	0,		0,	"Use Haar Cascades for faster (but less accurate) face detection.",	0},
 | 
			
		||||
| 
						 | 
				
			
			@ -21,12 +22,14 @@ struct argp argp = {
 | 
			
		|||
	0,
 | 
			
		||||
	0
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
struct optData optData = {
 | 
			
		||||
	false,
 | 
			
		||||
	"test",
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#ifndef _WIN64
 | 
			
		||||
error_t parseOptions(int key, char* arg, struct argp_state* state) {
 | 
			
		||||
	switch (key) {
 | 
			
		||||
		case 0x00:	//--haar-cascade
 | 
			
		||||
| 
						 | 
				
			
			@ -43,3 +46,4 @@ error_t parseOptions(int key, char* arg, struct argp_state* state) {
 | 
			
		|||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,9 +2,12 @@
 | 
			
		|||
#define ARGS_HPP
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
#ifndef _WIN64
 | 
			
		||||
#include <argp.h>
 | 
			
		||||
 | 
			
		||||
error_t parseOptions(int key, char* arg, struct argp_state* state);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
struct optData {
 | 
			
		||||
	bool useHaar;	//use haar cascades (0x00)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,9 @@
 | 
			
		|||
#include <cstring>
 | 
			
		||||
 | 
			
		||||
int main (int argc, char** argv) {
 | 
			
		||||
#ifndef _WIN64
 | 
			
		||||
	argp_parse(&argp, argc, argv, 0, 0, 0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	std::cout << PROJECT_NAME " is starting..." << std::endl;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue