C++ interop via Dynamic Library

2022-04-08 Thread jmgomez
I saw it, the problem is that it doesnt link the symbols without the extern. Im using the same compiler but I just figured that I could pass class pointers through FFI anyways so I guess Im fine with it now. Thanks

C++ interop via Dynamic Library

2022-04-07 Thread sls1005
I've discovered an undocumented pragma, `{.exportcpp.}`, that exports a proc without `extern "C"`. But I don't think it's a good idea to use it because every C++ compiler has its own idea of [name mangling](https://en.m.wikipedia.org/wiki/Name_mangling) , which makes your library not compatible

C++ interop via Dynamic Library

2022-04-06 Thread jmgomez
Maybe Im missing something, but I was already using dynlib and it does require the extern "C" prefix on the Cpp header which implies FFI. Im looking for something like it's shown here: () A pure C+

C++ interop via Dynamic Library

2022-04-06 Thread PMunch
This should be helpful:

C++ interop via Dynamic Library

2022-04-06 Thread jmgomez
Hi guys, Im trying to integrate Nim into an existing C++ application via a dynamic library. I got it working via FFI I was wondering if it could be possible to make it work without FFI, like if the Nim dynlib were an actual C++ dynlib (which it actually is). If so, how the process would be? I