msvc library headache

Discussion in 'OT Technology' started by crotchfruit, Aug 2, 2003.

  1. crotchfruit

    crotchfruit Guest

    cliff note forward: how do i build a static library in 6.0 that "uses mfc" and is linkable in .net 2003?

    here's the lowdown: i have visual c++ 6.0 [mfc42], the other person has visual studio .net 2003 [mfc71]. neither of us has the other person's compiler.

    i'm trying to give the other guy a static library that links with mfc (static library makes references to CWnd.) the problem is, when he tries to link with the library in .net, it says

    LINK : fatal error LNK1104: cannot open file 'mfc42.lib'

    so apparently my static library has fixed references to mfc42.lib in it, but VS .net 2003 doesn't come with mfc42.lib, just mfc71.lib :hs:.

    i tried going to the lib settings and choosing "not using MFC" (even though it is) and this just generates a billion other errors at linktime.

    i also suggested that the other person make a copy of mfc71.lib and rename it mfc42.lib. needless to say this did not work either.

    i tried searching google but came up empty.. any ideas?
     
  2. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    man, are you sure it just can't find the lib file? tell him to go into tools -> options and under the "Projects" category on the left side, pick "VC++ Directories". In the right dropdown box select "library files" and have him create a new entry listed below to where he is putting that .lib
     
  3. skinjob

    skinjob Active Member

    Joined:
    Jan 6, 2001
    Messages:
    2,337
    Likes Received:
    0
    Location:
    Aztlán
    You might try sending him mfc42.lib and mfc42.dll also
     
  4. skinjob

    skinjob Active Member

    Joined:
    Jan 6, 2001
    Messages:
    2,337
    Likes Received:
    0
    Location:
    Aztlán
    Or, if you have mfc static libraries installed, change your project settings to link to mfc statically and see what that does.
     
  5. crotchfruit

    crotchfruit Guest

    i thought about this. it's possible, but the mfc lib directory is about 50mb. besides, if this is going to be distributed to other people as well, i need a solution that doesn't require me to send other files.


    i told him to search for mfc42.lib on his computer.. he didn't say he found it, be he's not being very helpful in debugging this issue :hs:

    mfc42.lib comes w/ VS 6.0, and not with .net i guess. .net gets mfc70/71.lib. the lib i gave to him is called my_lib_blah.lib, not mfc42.lib.

    does anyone here use VS .net? how do you load libs that are linked to old versions of mfc?
     

Share This Page