Compare commits

..

No commits in common. "197be17615b634feb0ba04419a0f915e60865541" and "43aac674d1a5f8eb557dca4d328934120b341e4f" have entirely different histories.

3 changed files with 5 additions and 44 deletions

View File

@ -2,12 +2,11 @@ TEMPLATE = lib
TARGET = mobility_calc TARGET = mobility_calc
# CONFIG += staticlib # CONFIG += staticlib
QMAKE_CXXFLAGS += -std=c++17 -g -O0 QMAKE_CXXFLAGS += -std=c++11 -g -O0
INCLUDEPATH += $$_PRO_FILE_PWD_/include INCLUDEPATH += $$_PRO_FILE_PWD_/include
INCLUDEPATH += $$_PRO_FILE_PWD_/include/mobilisis
INCLUDEPATH += $$_PRO_FILE_PWD_/include/rapidjson INCLUDEPATH += $$_PRO_FILE_PWD_/include/rapidjson
INCLUDEPATH += $$_PRO_FILE_PWD_/include/mobilisis
SOURCES += \ SOURCES += \
src/calculator_functions.cpp \ src/calculator_functions.cpp \

View File

@ -1,29 +1,4 @@
#include <calculate_price.h> #include "calculate_price.h"
#ifdef WIN32
#include <time.h>
#include <iomanip>
#include <sstream>
extern "C" char* strptime(const char* s,
const char* f,
struct tm* tm) {
// Isn't the C++ standard lib nice? std::get_time is defined such that its
// format parameters are the exact same as strptime. Of course, we have to
// create a string stream first, and imbue it with the current C locale, and
// we also have to make sure we return the right things if it fails, or
// if it succeeds, but this is still far simpler an implementation than any
// of the versions in any of the C standard libraries.
std::istringstream input(s);
input.imbue(std::locale(setlocale(LC_ALL, nullptr)));
input >> std::get_time(tm, f);
if (input.fail()) {
return nullptr;
}
return (char*)(s + input.tellg());
}
#endif
#include <QDebug> #include <QDebug>
#include <QDateTime> #include <QDateTime>

View File

@ -6,22 +6,9 @@ CONFIG += -std=c++11
QMAKE_CFLAGS = -c -pipe -std=c11 -g -O0 -Wall -Wno-attributes -W -DDEBUG -D_REENTRANT -fPIC QMAKE_CFLAGS = -c -pipe -std=c11 -g -O0 -Wall -Wno-attributes -W -DDEBUG -D_REENTRANT -fPIC
QMAKE_CXX_FLAGS += -std=c11 QMAKE_CXX_FLAGS += -std=c11
INCLUDEPATH += $$_PRO_FILE_PWD_/../../MOBILISIS-Calculator/library/include/mobilisis/ INCLUDEPATH += $$_PRO_FILE_PWD_/../../MOBILISIS_Calculator/library/include/mobilisis/
INCLUDEPATH += . INCLUDEPATH += .
unix {
LIBS += -L$$OUT_PWD/../library/ -lmobility_calc LIBS += -L$$OUT_PWD/../library/ -lmobility_calc
}
CONFIG(debug, debug|release) {
win32 {
LIBS += -L$$OUT_PWD/../library/debug/ -lmobility_calc
}
} else {
win32 {
LIBS += -L$$OUT_PWD/../library/release/ -lmobility_calc
}
}
SOURCES += main.cpp SOURCES += main.cpp