Thanks for the answer. I found a workaround by creating this c file who does 
the includes.
    
    
    #ifndef C_INCLUDES
    #   define C_INCLUDES
    
    #   include "GL/glew.h"
    #   include "GLFW/glfw3.h" //glfw3 must be the last include
    
    #endif
    
    
    Run

I added this command before the nim command to create a library.
    
    
    gcc -Wall -c c_includes.c
    
    
    Run

In the nim test file I added {.link: "c_includes.o".} and I replaced all the 
header pragmas by {.importc.} then I run the nim command as in my previous post.

The program works as expected but I didn't compare the executable size with 
this solution because I'm not able to compile the first version of my test 
file. Feel free to answer if you don't like this workaround.

Reply via email to