HonzaHornik

Hello.I cannot relinking CRT libraries (msvcr80.dll, ...) due to unhandld.obj.
This obj is not generated during compiling. I used original makefile from
VS2005 SP1.
Can you help me.
Thanks.



Re: Visual C++ General relinking RTM libraries for VS2005SP1

Ted.

confirmed - currently asking VC team about this - I'll let you know what I find out. In the mean time please file a bug at connect.microsoft.com



Re: Visual C++ General relinking RTM libraries for VS2005SP1

Ted.

I found there was another problem too, due to the -wx option being specified a a linker option, causing startup.lib to not be generated properly. Once I removed the -wx option from makefile and makefile.sub, it gave me the same error as you had with unhandld.obj missing. It appears that they forgot to ship this file. When I removed references to unhandld.obj from the makefile and makefile.inc, I was able to build successfully.

Once you try the above, please let me know if this rebuilt CRT (DLL and LIB) is operational even without the missing unhandld.obj.





Re: Visual C++ General relinking RTM libraries for VS2005SP1

HonzaHornik

I tried remove reference to unhandld.obj too, relinking MFC library with CRT libraries and no problem occurred. I extract alias records from original MFC libraries now. It is slow process. After that I am going to try link it with my program.




Re: Visual C++ General relinking RTM libraries for VS2005SP1

HonzaHornik

Hello.

During relinking CRT and MFC libraries no errors occurred. When I can link this new libraries to my application error occurs : msvcrt.lib(wcrtexew.obj) : error LNK2001: unresolved external symbol ___CxxSetUnhandledExceptionFilter.

Thanks for your response.






Re: Visual C++ General relinking RTM libraries for VS2005SP1

Ted.

New approach.  From command prompt use LIB -LIST to find out the object names and then LIB -EXTRACT to extract unhandld.obj from existing libraries.  Copy it to the appropriate location, then add unhandld.obj back into the makefile.  So assuming you've copied your source code to C:\SRC, do the following:

CD C:\Program Files\Microsoft Visual Studio 8\VC\LIB

LIB -extract:..\build\intel\mt_obj\unhandld.obj /out:c:\src\intel\dll_lib\unhandld.obj libcmt.lib

LIB -extract:..\build\intel\xmt_obj\unhandld.obj /out:c:\src\intel\xdll_lib\unhandld.obj libcmtd.lib

copy c:\src\intel\dll_lib\unhandld.obj c:\src\intel\mt_lib\unhandld.obj

copy c:\src\intel\xdll_lib\unhandld.obj c:\src\intel\xmt_lib\unhandld.obj





Re: Visual C++ General relinking RTM libraries for VS2005SP1

HonzaHornik

Hello.

My program was linked without errors. Thanks for your support assistance.

Best regards Honza.






Re: Visual C++ General relinking RTM libraries for VS2005SP1

Ted.

Great! FYI, I just got official word from Alan of the VC libraries team that a better way to perform the unhandld.obj extraction and placement is to run the following command in your SRC folder (from a Visual Studio 2005 command prompt):

for %i in (dll mt xdll xmt) do pushd intel\%i_lib && lib /extract:..\build\intel\%i_obj\unhandld.obj eh.lib && popd

Ted.





Re: Visual C++ General relinking RTM libraries for VS2005SP1

HonzaHornik

Hello, I was tried run that command but is reported errors : i_lib was not expected.




Re: Visual C++ General relinking RTM libraries for VS2005SP1

Ted.

Weird, I just tried it myself in a Visual Studio 2005 Command prompt, copying and pasting exactly what was in my post, and it worked fine.  Sounds like you're missing the percent sign.  Also, It all needs to be on one single line.



Re: Visual C++ General relinking RTM libraries for VS2005SP1

HonzaHornik

Yes, before that I was launch this command from batch file. It si ok now.