Help! I cannot build Freeze successfully in MSVC 6.0 under windows 2003

I build ICE 1.2.0 in MSVC60 under win2003, but apears the following link error.

Configuration: Freeze - Win32 Debug
......
Linking...
Creating library Debug/freezed.lib and object Debug/freezed.exp
SharedDb.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Db::set_error_stream(class _STL::basic_ostream<char,class _STL::char_traits<char> > *)" ([email protected]@
@Z)
SharedDb.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall Db::verify(char const *,char const *,class _STL::basic_ostream<char,class _STL::char_traits<char> > *,unsigned int)" ([email protected]@@UAEHPBD0PAV[email protected]?
@[email protected]@[email protected])
SharedDbEnv.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall DbEnv::set_error_stream(class _STL::basic_ostream<char,class _STL::char_traits<char> > *)" ([email protected]@@UAEXPAV[email protected][email protected]
@Z)
Debug/freeze12d.dll : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

minimal - 4 error(s), 0 warning(s)


I have built the Berkeley DB 4.1.25 debug version and debug static version. But I don't know which sub directory of db-4.1.25 should be included by the IDE, so I copy db_cxx.h and db.h from the build_win32, copy cxx_common.h and cxx_except.h from dbinc into my include directory, and copy both libraries(dynamic and static) into my lib directory, those directories have been put into VC IDE directory options. I try to add DB_USE_DLL macro definition into the project, but more files have this link error(include EvictorI.obj and IndexI.obj).

I have searched the "set_error_stream" word under ICE1.2.0 directory, but I cannot find it. I am very strange for those link error.

What should I do now?

Comments

  • paullingpaulling Member
    Sorry, this is not a problem of ICE
    I have dump the lib of db I built, and compared the signature of the function. I found the db libs I built use the stl of vc not the stlport because the namespace of basic_ostream is stl but not _STL. Rebuilding the db lib with stlport, it is OK.
  • tony_htony_h Member
    I have had exactly same problem - can you advise in more detail what you did to resolve this.
    I downloaded the third party libraries from the zeroc website so did not have to build the third party libraries.

    Thanks
  • bernardbernard Jupiter, FLBernard NormierOrganization: ZeroC, Inc.Project: IceAdministrators, ZeroC Staff ZeroC Staff
    Hello,

    The third-party libraries available from www.zeroc.com/download are for Visual C++ 7.0 and 7.1.
    The pure-C libraries (everything except Berkeley DB) may work with VC++ 6; however they depend on the new MSCVR70.dll/MSCVR71.dll runtimes, so you may want to rebuild them with VC++ 6 (or obtain VC++ 6 builds) to minimize the number of MSCVR*.dll used by your application.

    Berkeley DB is partly C++, so with VC++ 6, you need to build it like Ice, using STLPort.
    To do so:
    - install STLPort
    - configure your Visual Studio environment to use STLPort: in Tools->Options->Directories, add <stlport home>\include\stlport as the *first* include directory, and add <stlport home>\lib to the library directory list.
    - build Berkeley DB

    Cheers,
    Bernard
  • tony_htony_h Member
    Ok thanks for clarifying that - I will build or obtain the third party libraries for VC++ 6 and go from there.
Sign In or Register to comment.