开发者

What should I do to recompile my static library (originally written in VS6) in visual studio 2008?

  • 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 r开发者_Python百科ecompile 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


  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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜