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

support linking to the debug version of wx library #13

Merged
merged 1 commit into from
Oct 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/wx-config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ int main(int argc, char** argv)
string build = build_cfg["BUILD"];
string vendor = build_cfg["VENDOR"];

string debug_lib_suffix;
if(build == "debug")
debug_lib_suffix = "d";

const auto& libs = parser.get_libs();
for(const auto& lib : libs) {
if(lib == "base") {
Expand Down Expand Up @@ -133,14 +137,14 @@ int main(int argc, char** argv)
// monolithic lib
stringstream libname;
// example: libwxmsw31u.a
libname << "wxmsw" << build_cfg["WXVER_MAJOR"] << build_cfg["WXVER_MINOR"] << "u";
libname << "wxmsw" << build_cfg["WXVER_MAJOR"] << build_cfg["WXVER_MINOR"] << "u" << debug_lib_suffix;
ss << "-l" << libname.str() << " ";
} else {
// translate lib name to file name
const auto& libs = parser.get_libs();
for(const auto& lib : libs) {
if(libs_map.count(lib)) {
ss << "-l" << libs_map[lib] << " ";
ss << "-l" << libs_map[lib] << debug_lib_suffix << " ";
}
}
}
Expand Down