Hi, I recently submitted a pull request that adds:
- Windows support for loading dynamic libraries via
LoadLibrary
- Using
@generated macro to simulate variadic C-style function templates (e.g., printf, printf!)
PR link: Add Windows DLL Support and Template-like Variadic Print Functions #70
While the core functionality works, there is one unresolved issue:
When calling standard C I/O functions like fopen and fclose via Windows dll api LoadLibrary, the program crashes.
Strangely, this does not happen when:
- Using Julia’s native ccall(:fopen, ...)
- Exporting LLVM IR and compiling into a standalone executable
This may be due to CRT linkage mismatches or buffering conflicts between different runtime contexts.
If anyone knows how to fix this CRT/runtime conflict, please help!
Cheers,
Kylin
Hi, I recently submitted a pull request that adds:
LoadLibrary@generatedmacro to simulate variadic C-style function templates (e.g.,printf,printf!)PR link: Add Windows DLL Support and Template-like Variadic Print Functions #70
While the core functionality works, there is one unresolved issue:
When calling standard C I/O functions like
fopenandfclosevia Windows dll apiLoadLibrary, the program crashes.Strangely, this does not happen when:
This may be due to CRT linkage mismatches or buffering conflicts between different runtime contexts.
If anyone knows how to fix this CRT/runtime conflict, please help!
Cheers,
Kylin