Repository navigation
Add implot-sys and implot3d-sys - #22
Merged
Merged
Conversation
Contributor
Author
Member
jeaye
reviewed
Oct 11, 2026
Comment on lines
+9
to
+10
| ;; TODO: jank can't deduce the template scalar type on ImPlot::PlotLine yet, so | ||
| ;; specify it explicitly here. |
Member
There was a problem hiding this comment.
Did you see a different error here than the vector JIT linker error?
Contributor
Author
There was a problem hiding this comment.
;; OK
(cpp/raw "
void foo() {
std::vector<double> xs{};
std::vector<double> ys{};
ImPlot::PlotLine(\"my line\", xs.data(), ys.data(), 0);
}
")
;; Compile error
(let [xs (#cpp (std.vector double))
ys (#cpp (std.vector double))]
(cpp/ImPlot.PlotLine "my line" (.data xs) (.data ys) 0))
In file included from <<< inputs >>>:1:
In file included from /build/source/compiler+runtime/src/jank/clojure/core.jank:5738:
/home/kyle/code/jank/projects/commons/implot-sys/example/target/debug/_cache/implot-sys-0.1-SNAPSHOT-out-2z1gAtZL17Ii7DlpgsJ4gQ/include/implot.h:990:17: error:
explicit instantiation of undefined function template 'PlotLine'
990 | IMPLOT_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, int count, const ImPlotSpec& spec=ImPlo...
| ^
/home/kyle/code/jank/projects/commons/implot-sys/example/target/debug/_cache/implot-sys-0.1-SNAPSHOT-out-2z1gAtZL17Ii7DlpgsJ4gQ/include/implot.h:990:17: note:
explicit instantiation refers here
─ analyze/invalid-cpp-call ─────────────────────────────────────────────────────────────────────────
error: Unable to instantiate template.
─────┬──────────────────────────────────────────────────────────────────────────────────────────────
│ src/implot_sys/example.jank
─────┼──────────────────────────────────────────────────────────────────────────────────────────────
27 │ (cpp/sin (+ (* ω t) ϕ))))))
28 │
29 │ (let [xs (#cpp (std.vector double))
│ ^ Expanded from this macro.
30 │ ys (#cpp (std.vector double))]
31 │ (cpp/ImPlot.PlotLine "my line" (.data xs) (.data ys) 0))
│ ^^^^^^^^^^^^^^^^^^^ Found here.
─────┼──────────────────────────────────────────────────────────────────────────────────────────────
🗎 │ https://book.jank-lang.org/reference/error/analyze/invalid-cpp-call.html
─────┴──────────────────────────────────────────────────────────────────────────────────────────────
Member
There was a problem hiding this comment.
Thanks for this. I've been able to reproduce it outside of implot locally. It's now ticketed here: jank-lang/jank#1082
kylc
force-pushed
the
implot
branch
2 times, most recently
from
October 11, 2026 19:32
efb3855 to
31398f5
Compare
Contributor
Author
|
Rebased and bumped lein-jank/jank-build versions |
Member
|
Published! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Depends on #18. Note the TODOs in the example.