Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chkwon/julia-cpp-project-template
https://github.com/chkwon/julia-cpp-project-template
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/chkwon/julia-cpp-project-template
- Owner: chkwon
- Created: 2024-03-16T12:04:39.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-16T13:12:02.000Z (8 months ago)
- Last Synced: 2024-03-16T15:52:24.674Z (8 months ago)
- Language: C++
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# julia-cpp-project-template
First compile the C/C++ part.
```
mkdir build
cd build
cmake ..
make
```This will make a shared library `build/libbar.dylib` in macOS or `build/libbar.so` in Linux.
Test
```
ctest lib
```Then, comeback to the main repo directory:
```
cd ..
```Then, run the julia script:
```
julia src/main.jl
```
or
```
julia> include("src/main.jl")
```## Remarks
In `bar.cpp`, the actual computation is done via `vector` in C++.
But, Julia is better connected with C.
So, `c_interface.c` has an interface to connect Julia and C++.