C-Block DLL never invoked — QSpice's own auto-compile silently fails, but manual dmc.exe compile succeeds every time

Hi all,

I have a C-Block (inv_ctrl, 3 pins: input, output, gnd/DLL’s-GND) that QSpice never seems to actually invoke — the Display("inv_ctrl: starting...") call at the top of the eval function never fires, and the simulator consistently reports:

This circuit has one floating node. From inspection, this node is believed to be floating: M
Warning: Singular matrix. Check node M

I’ve isolated this down as far as I can:
-Minimal test circuit: just U1 (the C-Block) with a resistor from its output pin to ground, gnd wired to real ground, nothing else on the schematic. Same result — no Display() output, V(m) stays at 0.

  • Pins/symbol confirmed correct: regenerated via Create C++ Template directly from the symbol, so the pin count/order matches exactly what QSpice itself expects (gnd takes no data[] slot, confirmed against he generated template).
  • Tested in multiple folder locations: the original path (which happens to be on OneDrive, with a space and dash in it: OneDrive - CompanyName), a subfolder, and a plain local path with no spaces (C:\For_Qspice\inv_ctrl) — identical failure in every location, no .dll ever produced by QSpice itself.
  • Manually compiling with the exact command from the .cpp header comment always succeeds:
    “C:\Users<me>\QSPICE\dm\bin\dmc.exe” -mn -WD inv_ctrl.cpp kernel32.lib

This produces a working inv_ctrl.dll every time, with no errors. But even with that .dll sitting right next to the .qsym/.cpp, in the same folder as the top-level .qsch, QSpice’s own simulation run still shows the identical floating-node error and never seems to load/use it.

One detail that might be relevant: my QSpice/DMC install lives at a non-default, per-user path (C:\Users\<me>\QSPICE\...) rather than C:\Program Files\QSPICE\... (likely because I installed without admin rights on a managed machine). I haven’t been able to confirm whether QSpice’s internal auto-compile step assumes the default install path rather than resolving relative to its own actual location, but the fact that manual compilation with the identical command always works, while QSpice’s own attempt never does, points strongly at something in how QSpice is locating or invoking its bundled compiler — not at the C-Block code, pins, or folder structure, which I’ve now tested pretty exhaustively.

Has anyone seen this before, especially with a non-default QSpice install location? Any way to confirm what path QSpice is actually trying when it auto-compiles a C-Block, or force it to use a specific compiler path?

Download these two files and check if you can execute them.
From your description, it seems that the reason your simulation cannot run is related to an incomplete circuit (a floating node where something is not connected), rather than a DLL issue.
dll_test.qsch (1.4 KB) | dllex.cpp (1.4 KB)
dll

Review this post to increase your trust level in forum to upload your schematic and .cpp for review.
Qspice Forum - New User to Basic User (File Upload) - QSPICE - Qorvo Tech Forum

Here is a tutorial working with DLL from scratch.
Beginner Tutorial for QSpice (Community Sharing) - QSPICE - Qorvo Tech Forum