Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -lole32 to link uninstal.exe with MinGW #4646

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
3 participants
@ReneNyffenegger
Copy link

commented Jul 11, 2019

When I tried to build all vim targets with

 make -f Make_ming.mak

I got the linker error undefined reference to '_imp__CoTaskMemFree@4'. for target uninstal.exe.

@codecov-io

This comment has been minimized.

Copy link

commented Jul 11, 2019

Codecov Report

Merging #4646 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4646      +/-   ##
==========================================
+ Coverage   81.34%   81.36%   +0.02%     
==========================================
  Files         111      111              
  Lines      144978   144978              
==========================================
+ Hits       117928   117962      +34     
+ Misses      27050    27016      -34
Impacted Files Coverage Δ
src/ex_cmds.c 82.18% <0%> (-0.25%) ⬇️
src/term.c 79.14% <0%> (-0.06%) ⬇️
src/message.c 76.94% <0%> (-0.05%) ⬇️
src/channel.c 83.98% <0%> (-0.04%) ⬇️
src/terminal.c 81.29% <0%> (+0.03%) ⬆️
src/gui_gtk_x11.c 58.01% <0%> (+0.04%) ⬆️
src/window.c 87.39% <0%> (+0.06%) ⬆️
src/ex_cmds2.c 88.4% <0%> (+0.11%) ⬆️
src/sign.c 94.39% <0%> (+0.2%) ⬆️
src/os_unix.c 63.53% <0%> (+0.22%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 247bf0d...e189891. Read the comment docs.

@k-takata

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

I feel it's strange because uninstal.c doesn't use CoTaskMemFree.
I can build uninstal.exe with MinGW-w64 without your change.
(Your change would be harmless, though.)

@ReneNyffenegger

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

I used the 32 bit version of MinGW on a 64 bit Windows environment. If I find time, I'll try to investigate your point.

@ReneNyffenegger

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

I get a similar error with a 64 bit MinGW also.

gcc is invoked like so:

gcc -I. -Iproto -DWIN32 -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_STDINT_H -DMS_WIN64 -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -march=x86-64 -Wall -DFEAT_XPM_W32 -I xpm/x64/include -I xpm/x64/../include -O3 -fomit-frame-pointer -freg-struct-return -o uninstal.exe uninstal.c -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion -lwsock32 -ld2d1 -ldwrite -Lxpm/x64/lib -lXpm -lwinmm

If I remove -D_WIN32_WINNT=0x0600 from the gcc invocation, the compilation and linking works fine.

I have no clue why WINVER=0x0600 should require -lole32.

@brammool brammool closed this in e28cfb2 Jul 11, 2019

@ReneNyffenegger ReneNyffenegger deleted the ReneNyffenegger:lole32 branch Jul 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.