GroveEngine/tests/visual/test_spdlog_filesystem.cpp
StillHammer 0540fbf526 fix: Resolve bgfx Frame 1 crash on Windows DLL + MinGW GCC 15 compatibility
- Add BGFX_CONFIG_MULTITHREADED=0 to fix TLS crash when bgfx runs from DLL
- Add -include stdint.h for MinGW GCC 15+ compatibility with bgfx third-party code
- Guard SDL2-dependent visual tests with if(SDL2_FOUND)
- Clean up debug logging in BgfxDevice::frame() and BgfxRendererModule::process()
- Re-enable all modules in test_full_stack_interactive.cpp
- Add grove::fs namespace for cross-platform filesystem operations
- Add InputModule C export for feedEvent across DLL boundary

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 11:03:06 +07:00

41 lines
1.0 KiB
C++

/**
* Test: spdlog + filesystem combined
*/
#include <fstream>
#include <iostream>
#include <filesystem>
#include <spdlog/spdlog.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#undef main
int main(int argc, char* argv[]) {
std::ofstream log("spdlog_fs_test.log");
log << "=== spdlog + filesystem Test ===" << std::endl;
log << "Step 1: main() started" << std::endl;
log.flush();
// Use filesystem
std::filesystem::path p = std::filesystem::current_path();
log << "Step 2: Current path: " << p.string() << std::endl;
log.flush();
// Use spdlog
auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
std::vector<spdlog::sink_ptr> sinks{console_sink};
auto logger = std::make_shared<spdlog::logger>("Test", sinks.begin(), sinks.end());
spdlog::register_logger(logger);
log << "Step 3: Logger created" << std::endl;
log.flush();
logger->info("Hello");
log << "Success!" << std::endl;
log.close();
std::cout << "Success!" << std::endl;
return 0;
}