Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

unresolved external symbol destr_detour322.0.1365

pierrebai
Beginner
330 Views
I have a project that compiles and links correctly when optimization are off. When using -O3, I get the following error at link:

unresolved external symbol destr_detour322.0.1365

This is a C++ project on Windows, using the compiler 9.1 (20060324) for 64-bits (EMT64). There is no destr_detour function anywhere. I guess it's a destructor-related thing.

Any idea what code might produce function with that type of name? How to avoid it or work around it?

Thanks.
0 Kudos
1 Reply
pierrebai
Beginner
330 Views
It seems that those functions were inlined destructors for a template class that was being returned by value from a function. For some reason the compiler thought the destructor were not needed, but the linker disagreed.

The work-around I found was to declare a global, use that global in a if() (which I then knew would never be taken, but the compiler didn't know unless it could track the whole program), and called rand() inside so that the compiler didn't know what would happen afterward and woul dbe forced to generate destructors in case of exception.

This is my guess as to what the compiler thinks and why the work-around works, of course.
0 Kudos
Reply