Fail to load shared library in Cling<Windows>

Hi All,

I am working with cling in windows platform, and I tried executing “Cling.exe .L test.lib”.
But it thrown below error.


test.lib:3:76: error:
source file is not valid UTF-8
…<U+0000><U+0000>F<U+0002><U+0000><U+0000>F<U+0002><U+0000><U+0000>B
^
test.lib:3:77: warning:
null character ignored [-Wnull-character]
…<U+0000><U+0000>F<U+0002><U+0000><U+0000>F<U+0002><U+0000><U+0000>B
^
^
test.lib:3:80: error:
source file is not valid UTF-8

^
test.lib:3:84: error:
source file is not valid UTF-8
…<96>
^
test.lib:3:90: warning:
null character ignored [-Wnull-character]

^
test.lib:3:92: error:
source file is not valid UTF-8
…<98>
^
test.lib:3:93: warning:
null character ignored [-Wnull-character]

^
test.lib:3:96: error:
source file is not valid UTF-8

^
test.lib:3:97: warning:
null character ignored [-Wnull-character]

^
test.lib:3:98: warning:
null character ignored [-Wnull-character]

^
test.lib:3:100: error:
source file is not valid UTF-8

^
test.lib:3:101: warning:

  null character ignored [-Wnull-character]


^
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
[cling]$

Please help me to resolve this.

Thanks and regards,
Muthu

Hi,

cling does’t recognize .lib as a binary library. It’s probably just not implemented, or it might not work (but you need a DLL). You could have a look at DynamicLibraryManager to see where it goes wrong, and whether this is supported in llvm at all.

Cheers, Axel.

Thanks Axel,

I added “.L test.dll” and verified but unfortunately when I accessed functions in .dll through cling, it threw me error “Maybe you need to load corresponding shared library”??? any idea, how to load a shared library?
Meanwhile I will also debug Cling and try to find the root cause. Please share me if you have any input on this

Muthu.

Hi,

does the DLL export the symbols?

Axel.