views:

15

answers:

2
  • There is a static library A with c++ classes wrapped by a C API in VS6.
  • I developed a static library B in VS6 using callbacks from library A.
  • The library B is used by the program C (commercial software) as a "user defined library" and linked to produce the program D.

Questions:

1) When program C uses VS 6 it works, should it work fine with VS 2008? Because it doesn't. 2) When I tried to recompile library B in VS 2008 it gave me a .lib file with only 28KB, and the old one had more than 2MB. Is it ok? What Am I probably doing wrong?

Thanks in advance

A: 
  1. No, there were changes in the language. However, most of working VC6 programs, once compile in VS9, would also work. What's the failure like?

  2. sounds miraclous. Perhaps, some dependencies were altered, and certain libraries are no longer linked with the lib.

Pavel Radzivilovsky
Thanks a lot for the answer!I did an example with a simpler code but the error messages are the same:LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libraries; use /NODEFAULTLIB:Libraryerror lnk2019 unresolved external symbol "_xsqr" in Funktion "_Add".error lnk2019 unresolved external symbol "_xcube" in Funktion "_Subtract".dymosim.exe : fatal error lnk1120 2 unresolved externals.Where "_xsqr" is a function of library A, "_Add" a function in library B and dymosim.exe is the program D. The error messages are given in the environment of program C
defaultlib warning is result of _DEBUG being improperly defined accross projects. How do you have a smaller binary if there're link errors? And, what are the unresolved externals? Do you know these symbols? Are they used in your code?
Pavel Radzivilovsky
A: 

Thanks a lot for the answer!

I did an example with a simpler code but the error messages are the same:

LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libraries; use /NODEFAULTLIB:Library

error lnk2019 unresolved external symbol "_xsqr" in Function "_Add". error lnk2019 unresolved external symbol "_xcube" in Function "_Subtract". dymosim.exe : fatal error lnk1120 2 unresolved externals.

Where "_xsqr" is a function of library A, "_Add" a function in library B and dymosim.exe is the program D. The error messages are given in the environment of program C.