Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

DLLs in C++

$
0
0

Greetings,

 I have been reading lately about DLLs in C++ and I stumbled upon this articlehttp://www.codeproject.com/Articles/655071/Basic-Cplusplus-Win-DLL

It mentioned in at the end that different C++ compilers have different name mangling. Therefore, we need to compile the DLL and the application that uses it with the same compiler.

Therefore, I was wondering. How DLLs are actually used? If something like OpenCV for example gives me the DLLs, I have to make my application with the same compiler they used to compile the DLLs? If so, doesn't that beats the purpose of the DLLs? That is to distributed reusable code easily?

Thus that lead me to explore into something similar to "extern "c"". However, as far as I could I understand, that removes the name mangling, but would not that remove the ability to overload a function? Which is a powerful feature to overlook?

My question is: Is it possible to make a DLL files that works on all C++?


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>