Closed Matk3z closed 9 months ago
Really sorry I have opened this issue for nothing, I've fixed my own mistake. I'm not really proficient in c++ and for whatever reason you need to declare static member variables in source file and not in header file. I don't know how I didn't find the solution earlier (altough coming from the Rust world such a non descriptive error for such an easy mistake is a bit frustrating...).
I agree, the error message is not very helpful for C/C++ beginners. But as you have found the reason on your own, you will know next time :-)
Hi,
As part of my research project around PKI in its systems, I'm trying to load a bunch of certificate file paths and share it between every car node in the simulation. To implement this behavior, I created a
StaticCertificateLoader
Class in src/artery/application with two static stack attribute (unsed_certificate and used_certificate). Then in the class ctor I populated the unused_certificate with everything in my certificate's folder usingdirectory_iterator
from boost file system.I added StaticCertificateLoader.cc in /artery/src/CmakeLists.txt, and I'm pretty sure it's being compiled as it appears in cmake traces. However, when I run my scenario I got this classic error:
<!> Error: Cannot load library '/home/mathi/artery/build/scenarios/simple-security/libartery_simple-security.so': /home/mathi/artery/build/scenarios/simple-security/libartery_simple-security.so: undefined symbol: _ZN6artery23StaticCertificateLoader19unused_certificatesB5cxx11E
I notice that if I declare my two stacks as not static, it runs fine. This leads me to two questions:
--verbose
but it didn't give me any more informationThank you for all your work on Vanetza and Artery those are amazing pieces of software! Mathias