Home Help Center

STLPort link error

CatOneCatOne Member Bill LloydOrganization: --Project: --
Hi, I'm building ICE 1.0.1 on Windows XP -- VC 6.0 SP 5 (release configuration) and I'm getting a link error:

Creating library Release/slice101.lib and object Release/slice101.exp
Grammar.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > __cdecl IceUtil::generateUUID(void)" ([email protected]@@YA?AV?$basic_
[email protected][email protected]@[email protected]@V[email protected]@[email protected]@[email protected]@XZ)
Release/slice101.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I'm using VC++ 6.0 -- This looks like a STLPort issue. I did the default "make install" with STLPort which copies the STLPort .lib files to Developer Studio\vc98\lib -- I can see them there. However they're not picked up -- Are the names of the STLPort lib files specified somewhere in the project settings or do I need to set something?

Thanks!

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Are you sure that you are using the STLport include files, instead of the standard Visual C++ include files? You must add the ...\include\stlport directory to your include path, before any of the system includes. From INSTALL.WINDOWS:
    If you're using STLport, also add the include files for STLport. (Note that you must add the include\stlport directory, not just "include".)

    You don't need to explicitly link any STLport libraries -- the STLport headers take care of this (provided that you use them :)).
  • CatOneCatOne Member Bill LloydOrganization: --Project: --
    I'm pretty sure...

    The first line in my "include files is"

    C:\DEVSTUDIO\VC98\INCLUDE\STLPORT

    (which is where they're copied when you run 'nmake -f vc6.mak install' and have set your VC++ variables correctly.

    I think it's finding the include files correctly, because previously I was getting some errors with "base64.cxx" before I put the STLPORT at the top and that problem went away, so I think it's picking them up :-/
  • CatOneCatOne Member Bill LloydOrganization: --Project: --
    Okay I figured out the problem -- it actually was related to the previous problem of not having the include path correct. I had compiled a few files, but then changed the include settings. I forgot to do a clean recompile, so some of the .obj files had references to the VC++ STL files in them, I'm betting.

    Cleaning and rebuilding cleared up the problem. Sorry ;-)
Sign In or Register to comment.