compiler linkage warning
I don't quite understand with respect to the documentations on linkage compatibility business as shown in the compiler message below:
I found a prospective problem that's associated with this warning could be that I'm using a string object inside a user-defined struct. Is it legal in the language to declare a string inside a struct?
1>e:\test\installer\prninst.h(159) : warning C4190: 'ObtainPrinterDriverDirectory' has C-linkage specified, but returns UDT 'std::basic_string<_Elem,_Traits,_Ax>' which is incompatible with C
The function is marked as "C", but your are using C++ code inside it. That's why it warns you.
Yes, that's fine. Elysia is right; what's probably goinig on is that your header contains
Originally Posted by stanlvw
yet the function is returning a C++ type.
Computer Programming: An Introduction for the Scientifically Inclined