Question

I am developing custom control that is using some STL methods. This is error I get when trying to compile project using this component:

[ILINK32 Error] Error: Unresolved external 'std::numeric_limits<double>::min()' referenced from C:\DOCUMENTS AND SETTINGS\ALL USERS\DOCUMENTS\RAD STUDIO\8.0\DCP\INSTALLCMP.LIB|VctDiag2.cpp

Strange because I have not slightest problem using this component in design mode.

Was it helpful?

Solution

I managed to solve it by doing following steps. I opened Project Options dialog box (in custom component project) and navigated to C++ linker page. Then unchecked option Link with Dynamic RTL. This had effect that all methods from linked libraries (static or dynamic) were inserted into executable file (or in my case into custom component library MyComponent.lib). So no additional files were needed when linking main project. Nevertheless I dont understand fully what should I do to avoid duplicity of STL code. This same function I am using also in main project. It seems to me that now this function is twice in MyProject.exe. First from linked MyComponent.lib and second as usual when linking used methods to executable file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top