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 shlwapi and version libraries to wx-config #955

Closed
MaartenBent opened this issue Oct 9, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@MaartenBent
Copy link
Contributor

commented Oct 9, 2015

Recent changes in wxWidgets require these libraries to be linked statically (see here).
They should be added to the --libs output of wx-config.

diff --git "a/sdk/wxconfig/wx-config-win.cpp" "b/sdk/wxconfig/wx-config-win.cpp"
index fdc32af..e267a96 100644
--- "a/sdk/wxconfig/wx-config-win.cpp"
+++ "b/sdk/wxconfig/wx-config-win.cpp"
@@ -736,6 +736,10 @@ public:

         po["__LIB_COMCTL32_p"] = addLib("comctl32");

+        po["__LIB_VERSION_p"] = addLib("version");
+
+        po["__LIB_SHLWAPI_p"] = addLib("shlwapi");
+
         if (sho["wxUSE_OLE"])
             po["__LIB_OLE32_p"] = addLib("ole32");

@@ -779,6 +783,8 @@ public:
                     <sys-lib>winmm</sys-lib>
                     <sys-lib>shell32</sys-lib>
                     <sys-lib>comctl32</sys-lib>
+                    <sys-lib>version</sys-lib>
+                    <sys-lib>shlwapi</sys-lib>
                     <sys-lib>ole32</sys-lib>
                     <sys-lib>oleaut32</sys-lib>
                     <sys-lib>uuid</sys-lib>
@@ -811,6 +817,7 @@ public:
         libs += po["__LIB_KERNEL32_p"] + po["__LIB_USER32_p"] + po["__LIB_GDI32_p"];
         libs += po["__LIB_COMDLG32_p"] + po["__LIB_REGEX_p"] + po["__LIB_WINSPOOL_p"];
         libs += po["__LIB_WINMM_p"] + po["__LIB_SHELL32_p"] + po["__LIB_COMCTL32_p"];
+        libs += po["__LIB_VERSION_p"] + po["__LIB_SHLWAPI_p"];
         libs += po["__LIB_OLE32_p"] + po["__LIB_OLEAUT32_p"] + po["__LIB_UUID_p"];
         libs += po["__LIB_RPCRT4_p"] + po["__LIB_ADVAPI32_p"] + po["__LIB_WSOCK32_p"];
         libs += po["__LIB_ODBC32_p"];
@@ -1058,7 +1065,7 @@ public:
         po["libs"] += addLib("wxzlib" + po["WXDEBUGFLAG"]) + addLib("wxregex" + po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"]);
         po["libs"] += addLib("wxexpat" + po["WXDEBUGFLAG"]) + po["EXTRALIBS_FOR_BASE"] + po["__UNICOWS_LIB_p"];
         po["libs"] += addLib("kernel32") + addLib("user32") + addLib("gdi32") + addLib("comdlg32") + addLib("winspool");
-        po["libs"] += addLib("winmm") + addLib("shell32") + addLib("comctl32") + addLib("ole32") + addLib("oleaut32");
+        po["libs"] += addLib("winmm") + addLib("shell32") + addLib("comctl32") + addLib("version") + addLib("shlwapi") + addLib("ole32") + addLib("oleaut32");
         po["libs"] += addLib("uuid") + addLib("rpcrt4") + addLib("advapi32") + addLib("wsock32") + addLib("odbc32");
         */
         po["rcflags"]  = addFlag("--use-temp-file") + addResDefine("__WXMSW__") + po["__WXUNIV_DEFINE_p_1"];

@eranif eranif closed this in 124db78 Oct 11, 2015

@MaartenBent

This comment has been minimized.

Copy link
Contributor Author

commented Oct 16, 2015

Could you also recompile wx-config.exe with this fix and add it to the installer?
(So I dont have to replace it every time codelite is updated, or link the libs myself).

Thanks.

@eranif

This comment has been minimized.

Copy link
Owner

commented Oct 17, 2015

There seems to be a bug in the installer that caused it to pack an old version wx-config this should be fixed now

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.