problems building vim with cygwin (Make_cyg.mak)

109 views
Skip to first unread message

Charles E Campbell Jr

unread,
Feb 29, 2012, 10:58:01 AM2/29/12
to vim...@googlegroups.com
Hello,

I've been having some problems compiling vim with

make -f Make_cyg.mak

using cygwin and vista. In particular,

gobj/os_win32.o:os_win32.c:(.text+0x1f5): undefined reference to `_wcsicmp'
gobj/os_win32.o:os_win32.c:(.text+0x24f2): undefined reference to `__wmkdir'
gobj/os_win32.o:os_win32.c:(.text+0x3d10): undefined reference to `__wopen'
gobj/os_win32.o:os_win32.c:(.text+0x3da1): undefined reference to `__wfopen'
gobj/os_mswin.o:os_mswin.c:(.text+0x19da): undefined reference to `__wchdir'
gobj/os_mswin.o:os_mswin.c:(.text+0x1b13): undefined reference to `__wstat'
gobj/os_mswin.o:os_mswin.c:(.text+0x1ee4): undefined reference to
`__wfullpath'
gobj/os_mswin.o:os_mswin.c:(.text+0x201d): undefined reference to
`__wfullpath'
gobj/os_mswin.o:os_mswin.c:(.text+0x3f0e): undefined reference to
`_IID_IPersistFile'
gobj/if_cscope.o:if_cscope.c:(.text+0x26b5): undefined reference to
`__open_osfhandle'
gobj/if_cscope.o:if_cscope.c:(.text+0x26f9): undefined reference to
`__open_osfhandle'

I tried searching for the libraries: nm -A *.a */*.a */*/*.a | fgrep wmkdir

but was unable to find the library holding these functions. Help would
be appreciated!

Regards,
Chip Campbell

pansz

unread,
Feb 29, 2012, 8:24:13 PM2/29/12
to vim...@googlegroups.com
I've just downloaded the newest version of cygwin (1.7.11) and the hg
version of vim (7.3.462) and using windows 7.
change src/Make_cyg.mak and src/GvimExt/Make_cyg.mak , gcc ==>gcc-3,
g++ ==> g++-3
make -f Make_cyg.mak works without problem.

:version shows
Compilation: gcc-3 -O3 -fomit-frame-pointer -freg-struct-return
-fno-strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_BIG
-DWINVER=0x0400 -D_WIN32_WI
NNT=0x0400 -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -DFEAT_MBYTE
-DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG
-DFEAT_GUI_W32 -DFEAT_C
LIPBOARD -march=i386 -Iproto -s -mno-cygwin
Linking: gcc-3 -s -o gvim.exe -luuid -lole32 -lwsock32 -mwindows
-lcomctl32 -lversion

and it seems that the only libraries used are uuid, ole32, wsock32,
windows, comctl32 and version.

> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php

Charles Campbell

unread,
Mar 1, 2012, 9:39:23 AM3/1/12
to vim...@googlegroups.com
pansz wrote:
> I've just downloaded the newest version of cygwin (1.7.11) and the hg
> version of vim (7.3.462) and using windows 7.
> change src/Make_cyg.mak and src/GvimExt/Make_cyg.mak , gcc ==>gcc-3,
> g++ ==> g++-3
> make -f Make_cyg.mak works without problem.
>
> :version shows
> Compilation: gcc-3 -O3 -fomit-frame-pointer -freg-struct-return
> -fno-strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_BIG
> -DWINVER=0x0400 -D_WIN32_WI
> NNT=0x0400 -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -DFEAT_MBYTE
> -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG
> -DFEAT_GUI_W32 -DFEAT_C
> LIPBOARD -march=i386 -Iproto -s -mno-cygwin
> Linking: gcc-3 -s -o gvim.exe -luuid -lole32 -lwsock32 -mwindows
> -lcomctl32 -lversion
>
> and it seems that the only libraries used are uuid, ole32, wsock32,
> windows, comctl32 and version.
>
I, too, had updated cygwin to the newest version, although the vim
source was at 7.3.451.
I'm not at the computer with windows at the moment, so I can't report on
the options, but
I'm certain that not all the libraries mentioned in your response were
in my link line.

Odd.

Regards,
Chip Campbell

Chris Sutcliffe

unread,
Mar 1, 2012, 12:39:15 PM3/1/12
to vim...@googlegroups.com
On 1 March 2012 09:39, Charles Campbell wrote:
> pansz wrote:
>>
>> I've just downloaded the newest version of cygwin (1.7.11) and the hg
>> version of vim (7.3.462) and using windows 7.
>> change src/Make_cyg.mak and src/GvimExt/Make_cyg.mak   , gcc ==>gcc-3,
>> g++ ==>  g++-3
>> make -f Make_cyg.mak works without problem.
>
> I, too, had updated cygwin to the newest version, although the vim source
> was at 7.3.451.
> I'm not at the computer with windows at the moment, so I can't report on the
> options, but
> I'm certain that not all the libraries mentioned in your response were in my
> link line.

Dumb question, are you trying to build a native Windows vim or are you
trying to create a Cygwin vim? If you are trying to create a native
Windows vim, try swapping g++ with i686-pc-mingw32-g++ and gcc with
i686-pc-mingw32-gcc. If you are trying to build a Cygwin vim, why not
use the configure mechanism and let it figure it out?

Chris

--
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

pansz

unread,
Mar 1, 2012, 7:39:14 PM3/1/12
to vim...@googlegroups.com
On Fri, Mar 2, 2012 at 1:39 AM, Chris Sutcliffe <ir0n...@gmail.com> wrote:
> Dumb question, are you trying to build a native Windows vim or are you
> trying to create a Cygwin vim?

Make_cyg.mak is specially designed to build native windows gvim.exe,
so he is obviously trying to build native windows gvim.

Chris Sutcliffe

unread,
Mar 1, 2012, 8:14:45 PM3/1/12
to vim...@googlegroups.com
On 1 March 2012 19:39, pansz wrote:

> On Fri, Mar 2, 2012 at 1:39 AM, Chris Sutcliffe wrote:
>> Dumb question, are you trying to build a native Windows vim or are you
>> trying to create a Cygwin vim?
>
> Make_cyg.mak is specially designed to build native windows gvim.exe,
> so he is obviously trying to build native windows gvim.

That being the case then the appropriate cross compiler
(i686-pc-mingw32-*) should be used.

Reply all
Reply to author
Forward
0 new messages