Hi !
I'm currently creating a python module who use SFML. I want to compile the module statically, so I added the SFML_STATIC preprocessor option and i pass this `sfml-graphics-s sfml-window-s sfml-system-s opengl32 freetype winmm gdi32` to the linker. I use MSVC. But this give me this error:
sfml-window-s.lib(VideoModeImpl.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_EnumDisplaySettingsW
sfml-window-s.lib(CursorImpl.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_GetDC
sfml-window-s.lib(WglContext.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_GetDC
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_GetDC
sfml-window-s.lib(CursorImpl.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_ReleaseDC
sfml-window-s.lib(WglContext.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_ReleaseDC
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_ReleaseDC
sfml-window-s.lib(CursorImpl.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_LoadCursorW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_LoadCursorW
sfml-window-s.lib(CursorImpl.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_DestroyCursor
sfml-window-s.lib(CursorImpl.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_CreateIconIndirect
sfml-window-s.lib(CursorImpl.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_CopyIcon
sfml-window-s.lib(WglContext.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_CreateWindowExA
sfml-window-s.lib(WglContext.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_DestroyWindow
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_DestroyWindow
sfml-window-s.lib(WglContext.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_ShowWindow
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_ShowWindow
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_TrackMouseEvent
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_TranslateMessage
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_DispatchMessageW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_PeekMessageW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_SendMessageW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_RegisterDeviceNotificationW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_DefWindowProcW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_CallWindowProcW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_RegisterClassW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_UnregisterClassW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_CreateWindowExW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_FlashWindowEx
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_SetWindowPos
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_GetKeyState
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_MapVirtualKeyW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_GetCapture
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_SetCapture
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_ReleaseCapture
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_GetForegroundWindow
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_SetForegroundWindow
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_SetWindowTextW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_GetClientRect
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_GetWindowRect
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_AdjustWindowRect
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_ShowCursor
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_SetCursor
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_ScreenToClient
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_MapWindowPoints
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_ClipCursor
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_GetWindowLongW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_SetWindowLongW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_GetWindowLongPtrW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_SetWindowLongPtrW
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_CreateIcon
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_DestroyIcon
sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_ChangeDisplaySettingsW
sfml-window-s.lib(JoystickImpl.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_RegCloseKey
sfml-window-s.lib(JoystickImpl.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_RegOpenKeyExW
sfml-window-s.lib(JoystickImpl.cpp.obj) : error LNK2001: symbole externe non r‚solu __imp_RegQueryValueExW
build\lib.win-amd64-cpython-39\pyTileSFML.cp39-win_amd64.pyd : fatal error LNK1120: 50 externes non r‚solus
The python setup script generate this linker command:
D:\VisualStudioIDE\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:/code/pyTileSFML/SFML-2.5.1/lib /LIBPATH:C:\Users\julie\AppData\Local\Programs\Python\Python39\libs /LIBPATH:C:\Users\julie\AppData\Local\Programs\Python\Python39 /LIBPATH:C:\Users\julie\AppData\Local\Programs\Python\Python39\PCbuild\amd64 /LIBPATH:D:\VisualStudioIDE\VC\Tools\MSVC\14.33.31629\lib\x64 "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64" gdi32.lib winmm.lib freetype.lib opengl32.lib sfml-system-s.lib sfml-window-s.lib sfml-graphics-s.lib /EXPORT:PyInit_pyTileSFML build\temp.win-amd64-cpython-39\Release\src/PyWindow.obj build\temp.win-amd64-cpython-39\Release\src/main.obj /OUT:build\lib.win-amd64-cpython-39\pyTileSFML.cp39-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-39\Release\src\pyTileSFML.cp39-win_amd64.lib
If i compile without -s, and i add dlls, the module works perfectly.