Skip to content

Instantly share code, notes, and snippets.

@Two9A
Created June 25, 2011 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Two9A/1046399 to your computer and use it in GitHub Desktop.
Save Two9A/1046399 to your computer and use it in GitHub Desktop.
Qt compile issues...
QT += network xml
QT -= gui
TARGET = QtCoreLib
TEMPLATE = lib
DEFINES += QTCORELIB_LIBRARY
INCLUDEPATH += src/logger \
src
SOURCES += src/logger/LoggerQt.cpp
HEADERS += src/logger/LoggerQt.h \
src/global.h
symbian {
MMP_RULES += EXPORTUNFROZEN
TARGET.UID3 = 0xE9FA7BB3
TARGET.CAPABILITY =
TARGET.EPOCALLOWDLLDATA = 1
addFiles.sources = cpp-client-core.dll
addFiles.path = !:/sys/bin
DEPLOYMENT += addFiles
}
unix:!symbian {
maemo5 {
target.path = /opt/usr/lib
} else {
target.path = /usr/lib
}
INSTALLS += target
}
#ifndef H_CORE_GLOBAL
#define H_CORE_GLOBAL
#include <QtCore/qglobal.h>
#if defined(QTCORELIB_LIBRARY)
# define CORELIBSHARED_EXPORT Q_DECL_EXPORT
#else
# define CORELIBSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // H_CORE_GLOBAL
#include "LoggerQt.h"
LoggerQt::LoggerQt()
{
}
void LoggerQt::d(const std::string tag, std::string msg)
{
qDebug() << tag.c_str() << " [DEBUG] " << msg.c_str();
}
void LoggerQt::w(const std::string tag, std::string msg)
{
qWarning() << tag.c_str() << " [WARN] " << msg.c_str();
}
void LoggerQt::e(const std::string tag, std::string msg)
{
qCritical() << tag.c_str() << " [ERR] " << msg.c_str();
}
#ifndef H_CORE_LOGGER_LOGGERQT
#define H_CORE_LOGGER_LOGGERQT
#include <QtGlobal>
#include <QtDebug>
#include <string>
class CORELIBSHARED_EXPORT LoggerQt
{
public:
LoggerQt();
void d(const std::string tag, std::string msg);
void w(const std::string tag, std::string msg);
void e(const std::string tag, std::string msg);
};
#endif //H_CORE_LOGGER_LOGGERQT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment