Hi Bram,

On 15/05/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote:

[redirecting to vim-dev]

> I am wondering whether l. 705 of Make_mvc.mak in vim-7.1-extra.tar.gz
> should be change from
>
>   LINKARGS1 = $(linkdebug) $(conflags) /nodefaultlib:libc
>
> to
>
>   LINKARGS1 = $(linkdebug) $(conflags) /nodefaultlib:libc /nodefaultlib:msvcrt
>
> I have been using it for maybe half a year and not found a single
> problem yet. It will eliminate this message when building vim.exe:
>
> libcmt.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib'
> conflicts with use of other libs; use /NODEFAULTLIB:library
>
> Without /nodefaultlib:msvcrt vim.exe will have a dependency on
> MSVCR71.DLL (I use MSVC 7.1). This added flag will not affect
> gvim.exe. The command lines I used are:
>
> nmake -f Make_mvc.mak GUI=yes OLE=yes MBYTE=yes IME=yes GIME=yes
> CSCOPE=yes PERL=C:\Perl DYNAMIC_PERL=yes PERL_VER=58
> PYTHON=C:\Python24 DYNAMIC_PYTHON=yes PYTHON_VER=24 RUBY=C:\ruby
> DYNAMIC_RUBY=yes RUBY_VER=18 RUBY_VER_LONG=1.8 TCL=C:\Tcl
> DYNAMIC_TCL=yes TCL_VER=84 TCL_VER_LONG=8.4 XPM=C:\xpm %*
> nmake -f Make_mvc.mak MBYTE=yes CSCOPE=yes PERL=C:\Perl
> DYNAMIC_PERL=yes PERL_VER=58 PYTHON=C:\Python24 DYNAMIC_PYTHON=yes
> PYTHON_VER=24 RUBY=C:\ruby DYNAMIC_RUBY=yes RUBY_VER=18
> RUBY_VER_LONG=1.8 TCL=C:\Tcl DYNAMIC_TCL=yes TCL_VER=84
> TCL_VER_LONG=8.4 XPM=C:\xpm %*

I'm very careful with these things.  Make_mvc.mak is used for several
versions of MSVC, starting at 4.1.  You need to check all versions to
make sure it doesn't cause any problems.

Er ... I do not have access to such old versions. I work on 7.1, and
can do so on 6.0 too. However, I believe MSVC versions are not
significant here. See below.

I suppose the error message you get is from some of the languages
Ruby/Python/Tcl/....  I don't get it, thus you can probably solve it by
checking your included libraries.  Perhaps one has not been build by
MSVC?  That usually causes trouble (not just an error message, but a
crash at runtime).  Try actually using all the languages.

I noticed that you did not build vim.exe with the languages, which
should be the reason you do not see the warning message. I have
verified that removing ActiveTcl 8.4 from my build makes
/nodefaultlib:msvcrt not necessary: in fact, then the option does not
have any effect at all.

I did actually try executing simple commands in Perl, Python, Tcl, and
Ruby, and they all succeeded.

I use the popular ActiveState builds for Perl, Python, and Tcl, and
ruby185-21 from the Ruby web site. I believe they are all MSVC
compatible.

Best regards,

Yongwei

--
Wu Yongwei
URL: http://wyw.dcweb.cn/

Reply via email to