-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91494f1
commit 925e537
Showing
3 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
[deps] | ||
CxxWrap = "1f15a43c-97ca-5a2a-ae31-89f07a497df4" | ||
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
using Test | ||
|
||
# Load the module and generate the functions | ||
module CppHello | ||
using CxxWrap | ||
@wrapmodule(()->joinpath(".","libhello.so")) | ||
using Libdl: dlext | ||
|
||
using CxxWrap | ||
@wrapmodule(() -> joinpath(".", "libhello.$(dlext)")) | ||
|
||
function __init__() | ||
function __init__() | ||
@initcxx | ||
end | ||
end | ||
end | ||
|
||
# Call greet and show the result | ||
@show CppHello.greet("Hello World") | ||
@testset "greet" begin | ||
# Call greet and show the result | ||
@test CppHello.greet("Hello World") == "Hello World" | ||
end |