fix: can't link in qt creator / debian 11

This commit is contained in:
Roy Qu 2022-10-19 09:49:09 +08:00
parent f0874217b0
commit 17bcac80fd
2 changed files with 4 additions and 4 deletions

View File

@ -63,9 +63,8 @@ CONFIG(debug_and_release_target) {
}
INCLUDEPATH += ../libs/qsynedit ../libs/redpanda_qt_utils
LIBS += -L$$OUT_PWD/../libs/redpanda_qt_utils/$$OBJ_OUT_PWD \
-L$$OUT_PWD/../libs/qsynedit/$$OBJ_OUT_PWD \
-lqsynedit -lredpanda_qt_utils
LIBS += $$OUT_PWD/../libs/qsynedit/$${OBJ_OUT_PWD}libqsynedit.a
$$OUT_PWD/../libs/redpanda_qt_utils/$${OBJ_OUT_PWD}libredpanda_qt_utils.a
SOURCES += \
HighlighterManager.cpp \

View File

@ -94,7 +94,7 @@ int ExecuteCommand(vector<string>& command,bool reInp) {
command_begin = 0;
}
argv = (char * *)malloc(sizeof(char *)*command_size);
for (int i=command_begin;i<command.size();i++) {
for (size_t i=command_begin;i<command.size();i++) {
argv[i-command_begin] = (char *)command[i].c_str();
}
argv[command.size()-command_begin]=NULL;
@ -114,6 +114,7 @@ int ExecuteCommand(vector<string>& command,bool reInp) {
free(current_dir);
exit(-1);
}
free(argv);
} else {
int status;
pid_t w;