How can I dynamically link stdlibc++.o.6 to my executable from a specified directory using cmake?

103 Views Asked by At

I want to dynamically link stdlibc++ to my executable. I do not want to use the packages installed on my system. I want to be able to point a specific folder in my project directory that contains a specific version of stdlibc++ and dynamically link it from there. How can I do this using cmake? Once I attempt to link the lib the way I want to, how do I go about checking and making sure it actually linked to the specified library and not the default one? Doing some research suggested I use a flag to turn off the default libs. However I would rather not do that. In my search, editing the rpath was another solution.

0

There are 0 best solutions below