- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a strange linker error that I have been facing with Intel C++ compiler 2013.
I have a class implemented as follows:
file1.h
class dummy {
void* foo(int x, int y);
}
inline void * dummy::foo(int x, int y) {
.........
}
In file 2, I have a function as follows:
file2.cpp
GRLIBError foo(ENUM2 *p, int x, int y, Ptr * _ptr) // GRLIBError is an ENUM
{
_ptr->ptr = reinterpret_cast< *dummy>(p)->foo(x, y);
return ERR_SUCCESS;
}
When I compile the project for x64, the project compiles fine. However when I try to compile for win32 I get the following error:
abc.exp : error LNK2001: unresolved external symbol "public: void * __thiscall dummy::foo(int,int)" (?foo@dummy@@QAEPAXHH@Z)
Note the same project compiles fine with MSVC 2008 compiler but fails with Intel Compiler 2013.
One of the other interesting things is that if I try to go to the declaration of foo function defined in file2, I get the following resolve ambiguity dialog box
--------------
Resolve Ambiguity
Symbols:
foo(GRLIBError foo(ENUM2 *p, int x, inty, Ptr * _ptr) - file2.cpp
dummy::foo(int x, int y) - file1.h
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page