Skip to content

Releases: processing-cpp/processing.cpp

C++ Mode v0.5.3

Choose a tag to compare

@pepc84 pepc84 released this 18 Aug 03:38

Windows

  • Fixed Sketch exited with code -1073741515 — gcc runtime DLLs (libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll) are now bundled from the same MSYS2 environment used to compile Processing.o, guaranteeing ABI compatibility

C++ Mode v0.5.2

Choose a tag to compare

@pepc84 pepc84 released this 16 Aug 18:52

Windows

  • Fixed Sketch exited with code -1073741515 (DLL not found) — gcc runtime DLLs (libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll, libssp-0.dll) are now bundled directly from the MSYS2 build environment, guaranteeing they match the compiler used to build Processing.o

macOS

  • Fixed sketch window not appearing when launched from the Processing IDE — the engine now registers with the macOS window server via NSApplication before GLFW initializes

C++ Mode v0.5.1

Choose a tag to compare

@pepc84 pepc84 released this 16 Aug 03:04

Windows

  • Fixed Sketch exited with code -1073741515 (DLL not found) — gcc runtime DLLs (libgcc_s_seh-1.dll, libssp-0.dll, libwinpthread-1.dll) are now copied from WinLibs to the sketch folder at launch

macOS

  • Fixed sketch window not appearing when launched from the Processing IDE — the engine now registers with the macOS window server via NSApplication before GLFW initializes, which is required for subprocess window display

C++ Mode v0.5.0

Choose a tag to compare

@pepc84 pepc84 released this 15 Aug 00:52

Parser fixes

  • Direct-init vs function-declaration ambiguityArray<Ground*> ground(segments) now correctly parses as a variable declaration instead of a function declaration; previously caused "segments is not a type"
  • Pointer-to-array declaratorfloat (*kernels[8])[3] now emits correctly instead of the broken float (*kernels[8][3])()
  • Comparison vs template ambiguityneighbours < 2 || neighbours > 3 and similar expressions no longer trigger false "unexpected token <" errors
  • using std::get removed — was shadowing PApplet::get(), causing get(x, y) to call std::get instead of reading screen pixels and crashing

Build pipeline fixes

  • Template-instantiated variables stay in _PSketchArrayList<Ball> balls and Array<Ground*> ground(segments) are no longer incorrectly hoisted to namespace scope, fixing "not declared in this scope" errors
  • Dependency hoisting fixed — variables referenced only as function calls (e.g. a method named flock() in Boid) are no longer incorrectly hoisted to namespace scope; fixes 'Flock' does not name a type; did you mean 'flock'?
  • Class dependency ordering — hoisted classes are now topologically sorted by member-access dependency; Liquid (which accesses Mover members via pointer params) is correctly emitted after Mover
  • Static sketch variable placement — variables with Processing API calls in their initializer (e.g. PImage* img = loadImage(...)) now go inside setup() instead of at static initialization time, preventing segfaults before the window exists
  • API name conflict detection expanded — variables named circle, square, point, line, image, text, fill, stroke, ambient, specular, arc, box, curve, ellipse, rect, rotate, scale, translate etc. are automatically renamed to avoid shadowing Processing API functions

Linter

  • Now uses the same full build pipeline as the real build, eliminating false positive errors
  • Forward declarations for functions that also have a definition in the same sketch are suppressed, fixing spurious "cannot be overloaded" errors

Engine

  • map() division-by-zero guardmap(v, a, a, ...) where start equals stop now returns the output start value instead of crashing
  • PVector proxy type supportPVector(width, height - 20) inside user-defined classes now compiles correctly; proxy types (_W, _H etc.) now satisfy is_convertible_v<T, float>

C++ Mode v0.4.8

Choose a tag to compare

@pepc84 pepc84 released this 14 Aug 04:31

MouseEvent and KeyEvent support

Mouse and keyboard callbacks now accept an optional event object — matching Java Processing's API exactly. Both zero-arg and event-arg overloads are supported simultaneously:

void mousePressed() { /* old style still works */ }
void mousePressed(MouseEvent e) {
  println(e.getButton(), e.isShiftDown(), e.getX(), e.getY());
}

void keyPressed(KeyEvent e) {
  println(e.getKey(), e.isControlDown(), e.getAction());
}

void mouseWheel(MouseEvent e) {
  println(e.getCount()); // scroll steps
}

Available on all callbacks: mousePressed, mouseReleased, mouseClicked, mouseMoved, mouseDragged, mouseWheel, keyPressed, keyReleased, keyTyped.

Both MouseEvent and KeyEvent expose the full Java Processing method set: getX(), getY(), getButton(), getCount(), getAction(), isShiftDown(), isControlDown(), isAltDown(), isMetaDown(), getKey(), getKeyCode().

Parser fixes

  • ArrayList<T> and other template types at top level — fixed a bug where trailing-declarator detection consumed the next top-level declaration, causing ArrayList<Ball> balls; after a class body to produce a false parse error
  • Comparison vs template ambiguityneighbours < 2 || neighbours > 3 no longer triggers a false "unexpected token" error; integer literals and comparison-chained identifiers after < are now correctly identified as comparisons, not template argument lists
  • union supportunion is now fully parsed and emitted alongside struct and class
  • Anonymous structs and unionsstruct { float x, y; } pos; works at top level and inside class bodies
  • Trailing declaratorsclass Foo { ... } *ptr, instance; is fully supported

Linter improvements

The live error underline (linter) now uses the same ClassHoister pass as the real build, so:

  • User-defined classes defined after setup()/draw() are correctly hoisted and visible to the rest of the sketch
  • Class methods that call Processing API functions (fill, ellipse, etc.) no longer produce false "cannot call member function without object" underlines
  • Static member definitions (int Counter::count = 0;) are correctly placed at file scope, not inside the sketch struct
  • The linter _PSketch proxy struct now matches the real generated struct, so width, height, mouseX, mouseY etc. are accessible inside hoisted user classes

Engine fixes

  • PVector constructors now accept proxy types (the width/height proxy structs), so PVector(width, height - 20) inside a user-defined class works correctly
  • All Processing API template functions (fill, stroke, ellipse, rect, etc.) now accept proxy types via is_convertible_v instead of is_arithmetic_v
  • fullScreen(int mode) implementation was missing — calling it caused a linker error
  • line(A, B, C, D) 4-arg template declaration was missing its template<> prefix

C++ Mode v0.4.7

Choose a tag to compare

@pepc84 pepc84 released this 14 Aug 00:18

CppMode 0.4.7

Windows crash fixes

  • Fixed Sketch exited with code -1073741819 (access violation) — root cause was MinGW 14.2 iostream initialization bug when no console is attached. Fixed with sync_with_stdio(false) before first iostream use in PApplet::run()
  • Replaced bundled GLFW and GLEW DLLs with official x64 SEH builds (GLFW 3.4, GLEW 2.3.1) — previous DLLs were compiled with 32-bit DWARF exception handling which is incompatible with 64-bit WinLibs
  • Removed gcc runtime DLLs from bundle (libstdc++-6.dll, libgcc_s_seh-1.dll) — these must match the compiler exactly and are provided by WinLibs
  • Fixed undefined reference to nanosleep64 — excluded <thread> on Windows, all sleep calls now use Sleep()
  • Fixed duplicate glClear/glfwSwapBuffers in initialization sequence that crashed some AMD/Intel drivers
  • Fixed early glfwPollEvents in settle loop causing crashes on Windows — settle loop now skipped on Windows
  • Fixed _setupDone=true being set too early, causing setProjection OpenGL calls from winsize_cb before context was ready
  • Added glewExperimental=GL_TRUE before glewInit to load all function pointers correctly
  • Requested OpenGL 3.3 compatibility profile explicitly for better driver compatibility
  • Removed legacy glShadeModel and glNormalize calls that can crash on some drivers
  • Added WinLibs bin and sketch folder to PATH when launching sketch so runtime DLLs are found

Build system

  • create-release.py now automatically triggers a fresh CI cache build and waits for it before packaging
  • create-release.py always names the output CppMode.zip regardless of version argument
  • Windows CI cache now compiles against GLEW 2.3.1 headers to match bundled DLL version
  • Windows CI cache now excludes <thread> to avoid nanosleep64 linker errors

Bug fixes

  • Fixed ErrorFormatter.java brace mismatch causing Java compile errors on some systems

C++ Mode v0.4.6

Choose a tag to compare

@pepc84 pepc84 released this 11 Aug 22:43

Input

  • Fixed stuck/ghost keys under multi-key chords — key/keyCode now translated atomically from GLFW key constant on release, not from stale globals (Bug A)
  • Fixed phantom key releases on Windows from GLFW virtual key mismatch (GLFW #2417) — scancode-based press tracking drops phantom releases (Bug B)
  • Added isKeyDown(int keyCode) API for querying held-key state
  • Renamed internal keysDown[256] to _keysDown to avoid collision with user variables

Windows

  • Fixed Sketch exited with code -1073741515 (DLL not found) — DLLs now copied from bundled libs/windows-x64/ to sketch folder at launch
  • Fixed undefined reference to nanosleep64 with GCC 14.2 — replaced usleep with std::this_thread::sleep_for
  • Added libssp-0.dll to runtime DLL copy list
  • Removed all MSYS2 references from Windows DLL check
  • Fixed extraction progress bar using ZipInputStream with real percentage
  • Fixed NoClassDefFoundError for com.sun.management on non-HotSpot JVMs

macOS

  • Fixed std::string not in namespace std errors on Apple clang — added #include <string> to Processing_api.h
  • Fixed RAND_MAX implicit int-to-float conversion warnings
  • Fixed char >= 128 tautological comparison warning
  • Fixed sprintf deprecated warning in stb headers
  • Fixed ::std:: namespace ambiguity in Processing.cpp on Apple clang
  • Bundled universal dylibs (arm64 + x64) in libs/macos/ — no Homebrew required on Apple Silicon or Intel
  • checkMacLibs checks bundled dylibs first before falling back to Homebrew

Performance

  • Cache no longer invalidated by timestamp — precompiled .o and .gch used if present
  • macOS ships precompiled Processing.o and Processing.h.gch for both arm64 and x64
  • Low memory threshold raised to 3GB before skipping PCH

Linter

  • Fixed double -std flag in PCH generation
  • Fixed linter using system g++ instead of portable WinLibs on Windows
  • PCH validity now checked by existence only

CI

  • macOS dylibs built as universal binaries from source using lipo
  • macOS build-cache produces Processing.o and Processing.h.gch for both arm64 and x64
  • Integration tests on all 3 platforms
  • Upgraded to actions/setup-java@v5

C++ Mode v0.4.5

Choose a tag to compare

@pepc84 pepc84 released this 11 Aug 03:17

Bug Fixes

Input

  • Fixed stuck/ghost keys under multi-key chords, atomic key translation on release, scancode-based press tracking
  • Fixed phantom key releases on Windows (GLFW #2417 virtual key mismatch)

Windows

  • Fixed Sketch exited with code -1073741515 (DLL not found at runtime)
  • Added libssp-0.dll to runtime DLL copy list
  • Removed all MSYS2 references from Windows DLL check
  • Fixed extraction progress bar using ZipInputStream with real percentage
  • Fixed NoClassDefFoundError for com.sun.management on non-HotSpot JVMs

Performance

  • Cache no longer invalidated by timestamp, precompiled .o and .gch used if present
  • macOS now ships precompiled Processing.o and Processing.h.gch
  • Low memory threshold raised to 3GB before skipping PCH

Linter

  • Fixed double -std flag in PCH generation
  • Fixed linter using system g++ instead of portable WinLibs on Windows

Install Wizard

  • Removed em dashes from setup dialog titles
  • Removed misleading bundled-libs text from dialogs

CI

  • Integration tests on all 3 platforms
  • macOS build-cache now produces Processing.o and Processing.h.gch

C++Mode 0.4.4

Choose a tag to compare

@pepc84 pepc84 released this 10 Aug 05:26
  • Fix NoClassDefFoundError for com.sun.management.OperatingSystemMXBean on non-HotSpot JVMs
  • Fix extraction progress bar using ZipInputStream instead of PowerShell
  • Remove bundled libs mention from dialogs
  • Remove em dashes from setup dialog titles

CppMode 0.4.3

Choose a tag to compare

@pepc84 pepc84 released this 10 Aug 00:28

CppMode 0.4.3

Bug fixes

  • Fixed bestCppStd() hanging when g++ not installed (3s timeout, fast-fail)
  • Fixed OOM on low-memory machines — skip PCH when < 2GB RAM free
  • Fixed linter output capped at 64KB to prevent memory exhaustion
  • Fixed bestCppStd() blocking the UI — now runs in background thread
  • Fixed bundled GL headers (gl.h, glu.h) causing CALLBACK macro errors on Linux/macOS
  • Fixed std::span requiring C++20 guard

CI

  • Integration tests on Linux, Windows, and macOS via GitHub Actions