diff --git a/cxxwrap1/callcxx.jl b/cxxwrap1/callcxx.jl index 55822e3..76da8e3 100644 --- a/cxxwrap1/callcxx.jl +++ b/cxxwrap1/callcxx.jl @@ -9,4 +9,4 @@ module CppHello end # Call greet and show the result -@show CppHello.greet() +@show CppHello.greet("Hello World") diff --git a/cxxwrap1/hello.cpp b/cxxwrap1/hello.cpp index 232a0dc..ad9214f 100644 --- a/cxxwrap1/hello.cpp +++ b/cxxwrap1/hello.cpp @@ -2,9 +2,9 @@ #include "jlcxx/jlcxx.hpp" -std::string greet() +std::string greet(std::string msg) { - return "hello, world"; + return msg; } JLCXX_MODULE define_julia_module(jlcxx::Module& mod)