"__imp" calling convention
Hi!
I am using a static library in my project when i link my project i get some unresolved errors like error LNK2001: unresolved external symbol __imp__recv@16
I think as u can see its i mean THE STATIC Lib is using "__imp"
calling convention and in the settings om C/C++ TAB in VC 6 we hav options like "__cdecl"
but not the one thats used in the STATIC LIBRARY SO PLZ TELL ME IF I WANT TO CALL A FUCTION SAY
void foo();
how should i call that function NEED HELP!!!!!!!!!!!!!
Regards,
Usman.
Re: "__imp" calling convention
I'm not aware that there exists a calling convention named '__imp'... It looks more like you missed one of the following steps...
- Include the header file of the library into the .cpp file where you want to use the function
- Add the library to your project (Project Options -> Register 'Link' -> Category 'General' -> Object/Library module)
- Add the path to the library (Project Options -> Register 'Link' -> Category 'Input' -> Additional library paths')
It looks like you missed step 2 and 3...
Ciao, Andreas
"Software is like sex, it's better when it's free." - Linus Torvalds
Re: "__imp" calling convention
Hi! Thanks for the reply. I too am not sure about that is it a calling convention calling convention ( may b it has something to with fucntion decoration) and the steps 2 & 3 u told me for step i am putting already putting the lib in settings link and for step 3 i am putting the lib in the project folder so i dont think its due to that it cant find the library.
P:S. One more thing may b its unimportant that i open the "lib" in a text editor ;) i can see fuction calls with "__imp"
Re: "__imp" calling convention
Dear All,
Did you find a solution for this. I am also getting errors for one of the library I am linking too:
Linking...
sen3.obj : error LNK2001: unresolved external symbol __imp__MTCSInitSystem
Debug/Sensor3.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.