Fatal error LNK1120 when compiling project c

I tried to compile main.c from this Emacs-FullScreen-Win32 project using the Visual Studio Developer command line, but I get the following error:

main.c
Microsoft (R) Incremental Linker Version 11.00.60610.1

Copyright (C) Microsoft Corporation.  All rights reserved.

/out:main.exe

main.obj

main.obj : error LNK2019: unresolved external symbol __imp__ShowWindowAsync@8 re
ferenced in function _WinMain@16

main.obj : error LNK2019: unresolved external symbol __imp__SetWindowPos@28 refe
renced in function _WinMain@16

main.obj : error LNK2019: unresolved external symbol __imp__MessageBoxW@16 refer
enced in function _WinMain@16

main.obj : error LNK2019: unresolved external symbol __imp__GetWindowLongW@8 ref
erenced in function _WinMain@16

main.obj : error LNK2019: unresolved external symbol __imp__SetWindowLongW@12 re
ferenced in function _WinMain@16

main.obj : error LNK2019: unresolved external symbol __imp__FindWindowW@8 refere
nced in function _WinMain@16

main.obj : error LNK2019: unresolved external symbol __imp__CommandLineToArgvW@8
 referenced in function _is_topmost_requested

main.exe : fatal error LNK1120: 7 unresolved externals

      

+3


source to share


1 answer


Those unresolved external issues are probably due to the fact that you are not linking correctly the libraries from which these functions are. In project settings go to project properties. Expand the configuration properties and then expand the linker. In the linker entry settings, you can specify the libraries that the program needs in the "additional dependencies" option.



0


source







All Articles