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 tried to find information on it but couldn't find any. Do I need to use some special pragma? Or just marking the function with cdecl will work? Do I also need to do something else for generating the headers?
Thanks, Juan
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:
(https://domiyanyue.medium.com/c-development-tutorial-4-static-and-dynamic-libraries-7b537656163e)
A pure C++ library (no FFI compatible)
Thanks!
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