Skip to content

Commit

Permalink
Adapted exaudfclient.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Sep 23, 2024
1 parent f8777f3 commit b22cbaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions exaudfclient/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ cc_binary(
srcs = ["exaudfclient.cc", "//base:load_dynamic"],
linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace
deps = ["//base/exaudflib:header", "//base:debug_message_h"]+VM_ENABLED_DEPS+VM_R_DEPS+
["//base/exaudflib:exaudflib-deps"],
["//base/exaudflib:exaudflib-deps", "//base/swig_factory:swig_factory"],
defines = VM_ENABLED_DEFINES,
data = ["//base:libexaudflib_complete.so"]
)
Expand All @@ -100,7 +100,7 @@ cc_binary(
srcs = ["exaudfclient.cc", "//base:load_dynamic"],
linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace
deps = ["//base/exaudflib:header", "//base:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+VM_R_DEPS+
["//base/exaudflib:exaudflib-deps"],
["//base/exaudflib:exaudflib-deps", "//base/swig_factory:swig_factory"],
defines = VM_ENABLED_DEFINES,
data = ["//base:libexaudflib_complete.so"]
)
Expand All @@ -123,7 +123,7 @@ cc_binary(
srcs = ["exaudfclient.cc", "//base:load_dynamic"],
linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace
deps = ["//base/exaudflib:header", "//base:debug_message_h"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+VM_R_DEPS+
["//base/exaudflib:exaudflib-deps"] + [ "@zmq//:zmq", "@protobuf//:protobuf"],
["//base/exaudflib:exaudflib-deps", "//base/swig_factory:swig_factory"] + [ "@zmq//:zmq", "@protobuf//:protobuf"],
defines = VM_ENABLED_DEFINES,
data = ["//base:libexaudflib_complete.so"],
)
Expand Down
6 changes: 4 additions & 2 deletions exaudfclient/exaudfclient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
#include "protegrityclient.h"
#endif

#include "base/swig_factory/swig_factory_impl.h"

using namespace std;
using namespace SWIGVMContainers;

Expand Down Expand Up @@ -138,7 +140,7 @@ int main(int argc, char **argv) {
::setlocale(LC_ALL, "en_US.utf8");

std::function<SWIGVMContainers::SWIGVM*()>vmMaker=[](){return nullptr;}; // the initial vm maker returns NULL

SwigFactoryImpl swigFactory;
#ifdef UDF_PLUGIN_CLIENT
vmMaker = [](){return new SWIGVMContainers::Protegrity(false);};
#else
Expand Down Expand Up @@ -168,7 +170,7 @@ int main(int argc, char **argv) {
} else if (strcmp(argv[2], "lang=java")==0)
{
#ifdef ENABLE_JAVA_VM
vmMaker = [](){return new SWIGVMContainers::JavaVMach(false);};
vmMaker = [&](){return new SWIGVMContainers::JavaVMach(false, swigFactory);};
#else
throw SWIGVM::exception("this exaudfclient has been compilied without Java support");
#endif
Expand Down

0 comments on commit b22cbaf

Please sign in to comment.