status-im / nim-bearssl

BearSSL wrapper in Nim
Other
40 stars 8 forks source link

link error with cpp backend #49

Closed levovix0 closed 1 year ago

levovix0 commented 1 year ago

I used apps/httpclient in chronos and tried to compile my program using cpp backend

I got this error:

/usr/bin/ld: /home/levovix/.cache/nim/app_d/@m..@s..@s..@s..@s..@s..@shome@slevovix@s.nimble@spkgs@schronos-3.2.0@schronos@sstreams@stlsstream.nim.cpp.o: in function «newTLSClientAsyncStream__OOZOOZOOZOOZOOZOOZhomeZlevovixZOnimbleZpkgsZchronos4551O50O48ZchronosZappsZhttpZhttpclient_1084(tyObject_AsyncStreamReadercolonObjectType___9c9bBZHMmvaYGAFOn2gipl9aQ*, tyObject_AsyncStreamWritercolonObjectType___Hv27n3GN11ug6DlyNW88Zg*, NimStringV2, long, unsigned short, unsigned short, unsigned char, br_x509_trust_anchor*)»:
@m..@s..@s..@s..@s..@s..@shome@slevovix@s.nimble@spkgs@schronos-3.2.0@schronos@sstreams@stlsstream.nim.cpp:(.text+0x109f2): undefined reference to «x509_noanchor_init(x509_noanchor_context*, br_x509_class_ const**)»
collect2: error: ld returned code 1
Error: execution of an external program failed: 'g++  @app_linkerArgs.txt'
undefined reference to «x509_noanchor_init(x509_noanchor_context*, br_x509_class_ const**)»
arnetheduck commented 1 year ago

50 works around this, though with a more strict C++ compiler such as clang you might run into more issues