One use case of us requires interfacing ffmpeg. I used cpp to circumvent many 
of the c2nim limitations (e.g. macros within structs). However, I don't come to 
grips with type definitions that aren't declared top to bottom.

Specifically, I had to reorder many types in the avformat.nim file.

  * What would be the best way to sort c2nim's type definitions automatically 
(on a limited time budget)?
  * What would it entail to upgrade the c2nim parser?
  * Or am I missing some obvious options? AFAIK, nim doesn't support forward 
declarations for good reasons.



The diff between preprocessed .h files --> c2nim --> automatically generated 
.nim vs manually reordered nim files is on github. 
[https://github.com/ahirner/nim-ffmpeg/compare/auto_only?expand=1#diff-7dc1342505fab6283c80ade1f70d8c78](https://github.com/ahirner/nim-ffmpeg/compare/auto_only?expand=1#diff-7dc1342505fab6283c80ade1f70d8c78)

An early version seems to work though. I just started using nim and love it! 

Reply via email to