Using VC++ 8.0  
Author Message
agustin_m





PostPosted: Visual C++ General, Using VC++ 8.0 Top

Hello,

I have a project that was created/build using VC++ 6.0, the project uses a third party library iconnect.lib. I am trying to compile the project using VC++ 8.0 but I get a lot of linker errors - some of those errors are below. Note: the project compiles without errors or warnings when using VC++ 6.0.

Can someone tell me what I need to do to get my project to compile/link successfully with VC++ 8.0

Thanks in advance!

-Agustin

ERRORS:

Error 82 error LNK2001: unresolved external symbol __RTC_CheckEsp iconnect.lib
) iconnect.lib
Error 164 error LNK2001: unresolved external symbol __RTC_CheckEsp SampleMsgHandler.obj
Error 165 error LNK2001: unresolved external symbol __RTC_Shutdown iconnect.lib
) iconnect.lib
Error 169 error LNK2001: unresolved external symbol __RTC_Shutdown iconnect.lib
Error 329 error LNK2001: unresolved external symbol __RTC_InitBase iconnect.lib
) iconnect.lib
Error 412 error LNK2001: unresolved external symbol __RTC_InitBase iconnect.lib
Error 493 error LNK2001: unresolved external symbol ___security_cookie Simple.obj
) Sample.obj
Error 495 error LNK2001: unresolved external symbol ___security_cookie SampleCommands.obj
Error 498 error LNK2001: unresolved external symbol ___CxxFrameHandler3 Simple.obj
Sample.obj
Error 500 error LNK2001: unresolved external symbol ___CxxFrameHandler3 SampleCommands.obj

Sample.obj

) iconnect.lib





) Sample.obj
) SampleCommands.obj
) SampleLog.obj
) SampleMsgHandler.obj
) Sample.obj
) SampleCommands.obj
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib




Visual C++2  
 
 
nobugz





PostPosted: Visual C++ General, Using VC++ 8.0 Top

Not a CLR question, moved to C++ General.


 
 
Sarath.





PostPosted: Visual C++ General, Using VC++ 8.0 Top

Seems your library is linking with another one

for e.g iconnect.lib might be built using some other thirdparty libraries like STLPort, boost etc...

I doubts, it is STLPort.Please verify it and if you missed something in Visual C++ 8.0 Linking options, please do add it, also please verify the order of Include Directories in your VS 2005 IDE with VS 98.


 
 
agustin_m





PostPosted: Visual C++ General, Using VC++ 8.0 Top

Sarath,

Thanks for your reply!

I don't think the iconnect.lib was build using a third party library...note that the project compiles and links under VS 98. I have posted the include directories for

VS 2005 and VS 98, also the linker command line for the VS 2005 project...

Look at the linker ERRORS and observe that the errors are cause by the basic_string class...

Any help with this issue will be greatly appreciated!

-Agustin

VS 2005 Include Directories:

$(VCInstallDir)include

$(VCInstallDir)atlmfc\include

$(VCInstallDir)PlatformSDK\include

$(FrameworkSDKDir)include

VS 98 Include Directories:

C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE

C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE

C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE

Linker Command Line:

/OUT:".\Release/Simple_cpp.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"../../win_extern/lib" /MANIFEST /MANIFESTFILE:".\Release/Temp\Simple_cpp.exe.intermediate.manifest" /PDB:".\Release/Simple_cpp.pdb" /SUBSYSTEM:CONSOLE /MACHINE:X86 /ERRORREPORT:PROMPT ../../lib/iconnect.lib ../../win_extern/lib/pthreadVC.lib ws2_32.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

ERRORS:

) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib
) iconnect.lib



 
 
nobugz





PostPosted: Visual C++ General, Using VC++ 8.0 Top

The signatures of the basic_ostream class members have changed between VS6 and VS8. I think it is the calling convention, (__cdecl to __clrcall), not sure. You'll need to rebuild iconnect.lib


 
 
agustin_m





PostPosted: Visual C++ General, Using VC++ 8.0 Top

I don't have the source code for iconnect.lib. Also I am compiling the project with No Common Language Runtime support

Thanks for any help you can provide me!

-Agustin



 
 
matt_92707





PostPosted: Visual C++ General, Using VC++ 8.0 Top

You aren't linking with a C library. Almost all the errors are related to that. There's a few errors in there related to not linking in WSOCK32.LIB as well.

Since you didn't specify I'm going to assume you are using the Visual C++ 2005 Express IDE. I don't think this IDE includes WSOCK32.LIB, so make sure you have installed the Platform SDK from Microsoft (its free too) so you will have it. If you download it at the Visual C++ 2005 Express web page then there's instructions to tell you how to properly install it as well. Follow the installation instructions. Professional versions of Visual C++ 2005 should come with WSOCK32.LIB included.

To fix your project configuration, go into the Project Options to Linker->Input and turn off the option that says "Ignore All Default Libraries" then add wsock32.lib to Additional Dependencies. Make sure you dont have /NODEFAULTLIB added manually under Linker->Command Line->Additional Options also. If you enabled that option on purpose because you got an MSVCRT missing error then you need to go into Tools->Options->Projects and Solutions->VC++ Directories->Library Files and add "$(VCInstallDir)lib" so that the compiler will know where its libraries are. Make sure there's an entry there for the lib folder from the Platform SDK as well.


 
 
agustin_m





PostPosted: Visual C++ General, Using VC++ 8.0 Top

Matt,

I am using VS 2005 Professional! I follow your instructions and still get the same erros...any other suggestion

Thanks,