This commit is contained in:
Allen Webster 2020-02-19 21:32:07 -08:00
parent f0421c12b5
commit 0422dadbc8
3 changed files with 340 additions and 338 deletions

View File

@ -6,6 +6,7 @@
extern "C" b32
get_version(i32 maj, i32 min, i32 patch){
printf("CUS: %d.%d.%d\n", MAJOR, MINOR, PATCH);
return(maj == MAJOR && min == MINOR && patch == PATCH);
}

View File

@ -21,7 +21,7 @@ arch=-m64
preproc_file=4coder_command_metadata.i
meta_macros="-DMETA_PASS"
g++ -I"$CODE_HOME" $meta_macros $arch $opts $debug -std=c++11 "$SOURCE" -E -o $preproc_file
g++ -I"$CODE_HOME" $opts $debug -std=gnu++0x "$CODE_HOME/4coder_metadata_generator.cpp" -o "$CODE_HOME/metadata_generator"
g++ -I"$CODE_HOME" $opts $debug -std=c++11 "$CODE_HOME/4coder_metadata_generator.cpp" -o "$CODE_HOME/metadata_generator"
"$CODE_HOME/metadata_generator" -R "$CODE_HOME" "$PWD/$preproc_file"
g++ -I"$CODE_HOME" $arch $opts $debug -std=gnu++0x "$SOURCE" -shared -o custom_4coder.so -fPIC

View File

@ -1700,6 +1700,7 @@ main(int argc, char **argv){
system_error_box(custom_not_found_msg);
}
custom.get_version = (_Get_Version_Type*)system_get_proc(custom_library, "get_version");
printf("VER: %d.%d.%d\n", MAJOR, MINOR, PATCH);
if (custom.get_version == 0 || custom.get_version(MAJOR, MINOR, PATCH) == 0){
system_error_box(custom_fail_version_msg);
}