ERROR: Could not find type "IPCClient" in the current scope.
Godot cached the old GDExtension DLL before IPCClient was added. It needs to reload the new version.
-
Close Godot completely (make sure it's not running in background)
-
Delete the
.godotcache folder:# Windows PowerShell Remove-Item -Recurse -Force ".godot" # Or Windows Command Prompt rmdir /s /q ".godot" # Or manually delete the .godot folder in Windows Explorer
-
Restart Godot:
- It will recreate the
.godotfolder - It will reimport all assets and reload the extension
- It will recreate the
-
Verify the classes are loaded:
- Open and run
scripts/tests/test_extension.gd - You should see all 5 classes (including IPCClient) pass
- Open and run
Sometimes simply closing and reopening Godot is enough:
- Close Godot completely
- Reopen the project
- Try running
scripts/tests/test_extension.gd
If the above doesn't work, the DLL might not have been built correctly:
cd "c:\Projects\Agent Arena\godot\build"
# Clean build
"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build . --config Debug --clean-first
# Restart Godot after build completesdir "c:\Projects\Agent Arena\bin\windows\libagent_arena.windows.template_debug.x86_64.dll"Should show a file ~3.5 MB in size with recent timestamp.
File agent_arena.gdextension should contain:
[configuration]
entry_symbol = "agent_arena_library_init"
compatibility_minimum = "4.5"
[libraries]
windows.debug.x86_64 = "res://bin/windows/libagent_arena.windows.template_debug.x86_64.dll"Open scenes/test_extension.gd and run it (F6). You should see:
=== Testing GDExtension Classes ===
✓ SimulationManager - OK
✓ EventBus - OK
✓ Agent - OK
✓ ToolRegistry - OK
✓ IPCClient - OK
=== Test Complete ===
All classes loaded successfully!
When Godot starts, it should print:
IPCClient initialized with server URL: http://127.0.0.1:5000
(This appears when you create an IPCClient node)
- Make sure you deleted the entire
.godotfolder - Make sure Godot was completely closed (check Task Manager)
- Try rebuilding the extension with
--clean-first
- Check that
godot/src/register_types.cppincludes:ClassDB::register_class<IPCClient>();
- Rebuild the extension
- Close Godot first
- If still locked, restart Windows (Godot may have crashed)
- Check Windows Event Viewer for C++ errors
- Try Debug build instead of Release build
- Check that all includes are correct in
agent_arena.h
- Check the build output for any errors (warnings are OK)
- Verify the file
godot/src/agent_arena.cppcontains the IPCClient implementation - Verify
godot/include/agent_arena.hcontains the IPCClient class definition - Try creating a minimal test:
extends Node func _ready(): var client = IPCClient.new() print("IPCClient created: ", client) client.free()
- Godot is completely closed
-
.godotfolder deleted - DLL exists and is recent (check timestamp)
- Extension built successfully (no errors)
-
IPCClientregistered inregister_types.cpp - Godot restarted
- Test script runs successfully