Page 1 of 2

FWH 14.06

PostPosted: Thu Jul 24, 2014 4:35 pm
by TimStone
Does 14.06, building with FWH Microsoft libraries and Visual C 2013, require MSVCR120.dll ?

I have no problem on my test machine, but on a client's computer I now see an error saying the file is not found. This was fine with 14.04 but not 14.06.

If so, where must the file be installed ? Is it native to Win 8.1 ?

Tim

Re: FWH 14.06

PostPosted: Thu Jul 24, 2014 5:24 pm
by Antonio Linares
Tim,

I am going to check it and I will get back to you, thanks for your so valuable feedback as always

Re: FWH 14.06

PostPosted: Thu Jul 24, 2014 5:32 pm
by Antonio Linares
Tim,

I just built samples\tutor02.exe and see the import libraries that are required:

It seems as we are using a function of those shown on the right side that are requesting the use of such DLL.

Please download pe.exe from here and check your import libs for your EXE for 14.04 and 14.06:
https://bitbucket.org/fivetech/fivewin-contributions/downloads/peinfo.exe

Image

Re: FWH 14.06

PostPosted: Thu Jul 24, 2014 6:29 pm
by TimStone
Thanks for the link.

MSVCR120.dll is the only file that is newly required. It is not called in 14.04 but is called in 14.06. Everything about the build ( source, configuration, etc ) is the same except for the FWH libraries.

In Windows 8 and 8.1, Microsoft no longer distributes the C runtime libraries that may be needed by the program. As a result, we must distribute this file. We are allowed to by Microsoft, but we can only send the required runtime files.

The file is found in the Program Files (x86)\ Microsoft Visual Studio 12.0\VC\redist\x86\MicrosoftVC120.CRT. Place the file in the same directory as the executable. This will then preclude conflicts with other installed versions of the same file.

I have tested this on the machine in question and it now works fine. We probably don't see the problem when building our applications because these files are installed with Visual Studio Professional ( and above ).

Tim

Re: FWH 14.06

PostPosted: Thu Jul 24, 2014 7:00 pm
by Antonio Linares
Tim,

The difference comes from the flags that we suply to the linker:

"%VCINSTALLDIR%"bin\link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:libc /NODEFAULTLIB:msvcrt

Using /NODEFAULTLIB:msvcrt we tell the linker not to use the MSVCR120.dll

But then, we get some symbols to resolve. I am checking them now :-)

Re: FWH 14.06

PostPosted: Thu Jul 24, 2014 7:13 pm
by Antonio Linares
Tim,

I am sending you modified FWH libs that does not require the MSVCR120.dll

The link flags to use from buildh32.bat are these:

"%VCINSTALLDIR%"bin\link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:libc /NODEFAULTLIB:msvcrt

Still we get some warnings to clean, but the DLL is not loner needed :-)

Re: FWH 14.06

PostPosted: Thu Jul 24, 2014 7:43 pm
by TimStone
Adding the NODEFAULTLIB:MSVCRT results in the following errors:

FiveHC32.lib(MSGS.obj) : error LNK2019: unresolved external symbol __imp__sprintf referenced in function _LToStr
FiveHC32.lib(FWBMP.obj) : error LNK2019: unresolved external symbol __imp__strstr referenced in function _HB_FUN_PALBTNPAINT

Thus it cannot build

Tim

Re: FWH 14.06

PostPosted: Thu Jul 24, 2014 7:57 pm
by rhlawek
Antonio,

This is related to the same issue I brought up shortly after 14.06 was released, and is part of the reason I cannot use 14.06 at all. As Tim noted 14.04 is just fine, but the build changes that were applied for 14.06 broke a number of things. You'll also remember only the 32 bit libraries were broken, the 64 bit libraries were working when I last tested. Would you please email the modified libraries to me as well.

Robb

Re: FWH 14.06

PostPosted: Thu Jul 24, 2014 11:47 pm
by Antonio Linares
Tim, Robb,

I am almost done with all the fixes and we will cleanly build it :-)

It may be ready for tomorrow

Re: FWH 14.06

PostPosted: Fri Jul 25, 2014 12:06 am
by rhlawek
Thank you sir.

Re: FWH 14.06

PostPosted: Fri Jul 25, 2014 5:06 am
by Antonio Linares
Tim, Robb,

Fixed. Just remember to call the MS link this way:

"%VCINSTALLDIR%"bin\link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:libc /NODEFAULTLIB:msvcrt

Now see what we get:
Compiling...
Harbour 3.2.0dev (r1406271520)
Copyright (c) 1999-2014, http://harbour-project.org/
Compiling 'tutor02.prg' and generating preprocessed output to 'tutor02.ppo'...
Lines 4225, Functions/Procedures 1
Generating C source output to 'tutor02.c'... Done.
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.30501 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

tutor02.c
Creating library tutor02.lib and object tutor02.exp
* Application successfully built *


I am sending you the modified FWH libs, thanks!

Re: FWH 14.06

PostPosted: Fri Jul 25, 2014 5:17 am
by Antonio Linares
Even simpler :-)

We just can use:

"%VCINSTALLDIR%"bin\link @msvc.tmp /nologo /subsystem:windows /NODEFAULTLIB:msvcrt

So we instruct the linker to never use the MSVCRT DLL

Re: FWH 14.06

PostPosted: Fri Jul 25, 2014 7:29 am
by Maurizio
Antonio ,
cann I have the modified libraries ?

Maurizio
www.nipeservice.com

Re: FWH 14.06

PostPosted: Fri Jul 25, 2014 9:21 am
by Antonio Linares
Maurizio,

Already sent to your email :-)

Re: FWH 14.06

PostPosted: Sat Jul 26, 2014 7:53 pm
by TimStone
Sorry for the delay in responding. I did build with the new lib using my UEStudio build file and VC 2013. I had no problems using the latest library you supplied and I was also able to run the resulting program on a computer where MSVCRT was not installed.

Thank you.

I will test with Visual Studio 2013 internal build later today but I see no reason why it won't work just as well.

TIm