-
Notifications
You must be signed in to change notification settings - Fork 2
Troubleshooting
Common issues and solutions when using Apex.
Error: cmake: command not found
Solution:
- macOS:
brew install cmake - Ubuntu/Debian:
sudo apt-get install cmake - Fedora:
sudo dnf install cmake
Error: Compiler not found or incompatible
Solution:
- macOS: Install Xcode Command Line Tools:
xcode-select --install - Linux: Install build essentials:
sudo apt-get install build-essential
Error: undefined reference to apex_*
Solution:
- Ensure library is built:
makein build directory - Check library path:
LD_LIBRARY_PATH(Linux) orDYLD_LIBRARY_PATH(macOS) - Verify linking:
-lapexflag is present
Problem: Tables appear as code or plain text
Solutions:
- Ensure tables are enabled: Don't use
--no-tables - Check mode: Some modes disable tables
- Verify table syntax: Requires proper pipe alignment
Problem: Headers don't have id attributes
Solutions:
- Check if IDs are disabled: Remove
--no-idsflag - Verify mode: All modes generate IDs by default
- Check manual ID syntax: May be incorrectly formatted
Problem: Math appears as plain text
Solutions:
- Ensure math is enabled: Don't use
--no-math - Check mode: CommonMark and GFM modes disable math
- Verify MathJax/KaTeX: Apex outputs HTML, you need a math renderer
Problem: Wiki links appear as plain text
Solutions:
- Use unified mode:
--mode unified - Enable wiki links: They're enabled by default in unified mode
- Check syntax:
[[Page]]not[Page]
Problem: Include syntax not processed
Solutions:
- Enable includes: Use
--enable-includesflag - Check file paths: Relative to document or use
base_directoryin API - Verify syntax:
<<[file.md]or{{file.md}}
Problem: Command produces no output
Solutions:
- Check input: Verify file exists or stdin has content
- Check errors: Run with verbose output if available
- Verify mode: Some modes may filter content
Problem: HTML is all on one line
Solutions:
- Use
--prettyflag for formatted output - Check if pretty printing is disabled in options
Problem: Standalone document has no styling
Solutions:
- Add stylesheet:
--style styles.css - Use inline styles: Apex includes basic default styles
- Check CSS path: Ensure file exists and path is correct
Problem: Syntax feature doesn't work
Solutions:
- Check mode: Feature may not be available in current mode
- Switch to unified mode:
--mode unifiedhas all features - See Modes for feature availability
Problem: Header IDs don't match expected format
Solutions:
- Check mode: Each mode has its own ID format
- Override format: Use
--id-formatin unified mode - See Header IDs for format details
Problem: Application memory usage grows
Solutions:
- Free all strings: Always call
apex_free_string()on returned strings - Check for NULL: Don't free NULL pointers (safe, but unnecessary)
- Reuse options: Create options once, reuse for multiple conversions
Problem: Crashes or incorrect output in multi-threaded code
Solutions:
- Use separate options: Each thread needs its own
apex_options - Don't share nodes: Document nodes are not thread-safe
- See C API for thread safety details
Problem: Apex.framework not found at runtime
Solutions:
- Embed framework: Set to "Embed & Sign" in Xcode
- Check search paths: Verify framework search paths
- Verify architecture: Ensure framework matches app architecture
Problem: Conversion takes too long
Solutions:
- Disable unused features: Turn off extensions you don't need
- Check input size: Large documents take longer
- Profile: Use profiling tools to identify bottlenecks
Problem: Application uses too much memory
Solutions:
- Free strings promptly: Don't keep HTML strings longer than needed
- Process in chunks: For very large documents, consider splitting
- Check for leaks: Use memory profiling tools
If you encounter issues not covered here:
- Check the Syntax page for correct syntax
- Review Modes to ensure feature is available
- See Command Line Options for flag usage
- Check C API for programmatic issues
- Installation - Build and installation issues
- Usage - Usage examples
- C API - API-specific troubleshooting
Copyright 2025 Brett Terpstra, All Rights Reserved | MIT License
- Getting Started - Your first steps with Apex
- Installation - How to build and install Apex
- Usage - Basic usage examples
- Syntax - Complete syntax reference for unified mode
- Modes - Understanding processor modes
- Command Line Options - All CLI flags explained
- Header IDs - How header IDs are generated
- C API - Programmatic API documentation
- Xcode Integration - Using Apex in Xcode projects
- Examples - Practical usage examples
- Troubleshooting - Common issues and solutions
- Credits - Acknowledgments and links to related projects