Errors 2001 and 1120 linking import library 
Author Message
 Errors 2001 and 1120 linking import library

Please help..!!
This is driving me crazy. Nothing that I do seems to be able to fix this

I built a DLL, in another environment, It works very well in its own

I need to integrate it into a VC project.
I used the lib program to generate the .lib and .exp files from the .def
A dump of them shows that my function exists unmangled as it should in
The prototype and function call below are from the VC source file that I
been trying to get to link. The VC linker errors are below that..

It's pretty obvious from the snippets below that extern "C" does NOT
turn off
name manging in VC 5.
Why ?
Is there a switch that will override extern "C"..??
Is this some sort of grotesque BUG..???

More to the point, if extern C cannot be relied upon to make this link
how is it possible to get VC and any other environment to cooperate.??

// Prototype --------------------------------------------

extern "C"
        void __declspec(dllexport) WINAPI InvokeProcsDialog( void );


// function call -----------------------------------


// Linker error -----------------------------------------
VCtestProc.obj : error LNK2001: unresolved external symbol

Debug/VCtestProc.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

VCtestProc.exe - 2 error(s), 0 warning(s)

Sat, 21 Oct 2000 03:00:00 GMT  
 Errors 2001 and 1120 linking import library

"WINAPI" resolves to _stdcall, unfortunatly this is not a standardize
calling convention (even MS disagrees with itself).

In order to use this DLL from a VC++ app you will need to use LoadLibrary
and GetProcAddress, you can't link to the import library or use the header

Is there another word for synonym?

| Author for Pinnacle Publishing "Visual C++ Developer" |

Sat, 21 Oct 2000 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Link error 2001 and 1120

2. BeginnerQuestion -> LinkerError 2001 and 1120

3. link 2001 error in statically linked mode only

4. link 2001 error when statically linking

5. + lnk2019 error +lnk 1120 error

6. Error LNK2001 Fatal error 1120

7. Linking Error 2001

8. Link Error 4006,4008,2001

9. Link 2001 Errors and Class Wizard Problem

10. Help-Linking Error 2001

11. Linking Error 2001

12. Link Error 2001 for...


Powered by phpBB® Forum Software