epezent / epezent/implot

error: invalid operands to binary expression

Open
#612 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6.2k
Forks
693
PR merge metrics
No merged PRs in 30d

Description

I'm seeing this error when including the files:
```
include/implot/implot.cpp:279:84: error: invalid operands to binary expression ('ImVec4' and 'ImVec4')
279 | case ImPlotCol_AxisGrid: return GetStyleColorVec4(ImPlotCol_AxisText) * ImVec4(1,1,1,0.25f);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
include/implot/implot.cpp:370:66: error: invalid operands to binary expression ('ImVec2' and 'const float')
370 | DrawList->PrimQuadUV(pos + ImVec2(glyph->Y0, -glyph->X0) * scale, pos + ImVec2(glyph->Y0, -glyph->X1) * scale,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~
include/implot/implot.cpp:370:111: error: invalid operands to binary expression ('ImVec2' and 'const float')
370 | DrawList->PrimQuadUV(pos + ImVec2(glyph->Y0, -glyph->X0) * scale, pos + ImVec2(glyph->Y0, -glyph->X1) * scale,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~
include/implot/implot.cpp:371:66: error: invalid operands to binary expression ('ImVec2' and 'const float')
371 | pos + ImVec2(glyph->Y1, -glyph->X1) * scale, pos + ImVec2(glyph->Y1, -glyph->X0) * scale,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~
include/implot/implot.cpp:371:111: error: invalid operands to binary expression ('ImVec2' and 'const float')
371 | pos + ImVec2(glyph->Y1, -glyph->X1) * scale, pos + ImVec2(glyph->Y1, -glyph->X0) * scale,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~
include/implot/implot.cpp:594:42: error: invalid operands to binary expression ('const ImVec2' and 'const ImVec2')
594 | ImRect outer_rect_pad(outer_rect.Min + pad, outer_rect.Max - pad);
```

Here's a simple version of the kind of file that would file:
```
#include "sokol_gfx.h"
#include "sokol_app.h"
#include "imgui/imgui.h"
#include "util/sokol_imgui.h"
#include "implot/implot.h"
#include "implot/implot_internal.h"
#include "implot/implot.cpp"
#include "implot/implot_items.cpp"
```

Here's my build file:
```
clang++ -I include -I include/sokol -I include/imgui lib/macos/implot.cpp -o implot
```

More details:
```
clang++ --version
Homebrew clang version 19.1.7
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/19.1.7/bin
Configuration file: /opt/homebrew/etc/clang/arm64-apple-darwin23.cfg
```

Any ideas what could be causing this? Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.