>From looking at other nim repos, it looks like the accepted pattern if you are 
>making a library is to have a src directory under your pojects root directory 
>with the library code. Then an example directory under the root for example 
>code. How do you set this up so that you can conveniently compile and run the 
>example programs?

Currently my nimble file is:
    
    
    # Package
    
    version       = "0.1.0"
    author        = "Jack Mott"
    description   = "type safe opengl wrapper"
    license       = "MIT"
    
    bin           = @["../examples/example02"]
    srcDir        = "src"
    
    # Dependencies
    
    requires "nim >= 0.17.0"
    requires "sdl2"
    requires "opengl"
    

and my examples dir has a nim.cfg with \--path:"../src"

This works until it tries to produce the executable at 
root/../examples/example02.exe and that dir doesn't exist, it should be 
root/examples/example02.exe

Any tips? 

Reply via email to