Hello,

Today I came across this run time error when running a nim compiled program 
that dynamically linked with an external c++ library .so (let's call it 
`external_lib_64.so`)
    
    
    could not load: external_lib_64.so
    compile with -d:nimDebugDlOpen for more information
    
    
    Run

So I compiled and ran the nim program with `-d:nimDebugDlOpen` and still that 
did not give any useful information.

I knew that the `external_lib_64.so` was compiled using g++ 6.3.0. By a stroke 
of luck, it occurred to me that may be I should check the g++ version in my 
current environment where I was compiling the nim program .. and indeed it was 
different; it was g++ 8.4.0.

Once I switch to g++ 6.3.0, re-compiled the nim program and ran it, that "could 
not load: external_lib_64.so" error went away and things once again ran fine as 
before.

**Questions to the community:**

  * Should we need to match the g++ versions this way all the time? I thought 
that the compiled external_lib_64.so was "bulletproof" now that it was 
compiled. But apparently not?
  * @Araq Is it possible for the Nim compiler to detect this g++ version 
mismatch and throw a better error?



This was using the latest stable nim 1.2.0.

Reply via email to