Eliminating Linker Warnings with OTK C++
I revisited the sample OTK C++ program named otk_install, which I hadn't looked at in about 2 years. I discovered, once again, that I couldn't build a DLL without provoking linker warnings 4049 and 4217. It's not just one or two of these warnings, either; I received 104 warnings for the tiny amount of code in otk_install.
PTC seems to be aware of this problem, because their OTK C++ make files include these linker options:
/ignore:4049 /ignore:4219 /ignore:4217
I haven't been able to do better. All of my current code that uses OTK C++ also includes these options.
I don't like suppressing warnings. When you do that, you don't know whether the warning is happening only once or a thousand times. I nearly always believe that there will be consequences one day for hiding the warnings instead of addressing them.
Microsoft states that these warnings carry only a (presumably minor) performance impact:
Although the final generated code will behave correctly, the code generated to call the imported function is less efficient than calling the function directly.
...but given that I received 104 instances of these warnings, I have to assume that there could be as many (or more) invocations of the affected functions.
I have noticed these warnings when building DLL's, but not EXE's. Of course, I use DLLs for my synchronous applications.
Has anyone successfully built a DLL in OTK C++ without provoking these warnings?
|+| M a r k |+|
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

