「Qtの基礎 - ライブラリ」の版間の差分

ナビゲーションに移動 検索に移動
157行目: 157行目:
  #include <QtCore/qglobal.h>
  #include <QtCore/qglobal.h>
   
   
  #ifdef Q_OS_WIN  // Windows
  #if defined(Q_OS_WIN)   // Windows
     #if defined(UTILS_LIBRARY)
     #if defined(UTILS_LIBRARY)
       #define UTILS_EXPORT __declspec(dllexport)
       #define UTILS_EXPORT __declspec(dllexport)
163行目: 163行目:
       #define UTILS_EXPORT
       #define UTILS_EXPORT
     #endif
     #endif
  #elif Q_OS_LINUX  // Linux
  #elif defined(Q_OS_LINUX) // Linux
     #if defined(UTILS_LIBRARY)
     #if defined(UTILS_LIBRARY)
       #define UTILS_EXPORT Q_DECL_EXPORT
       #define UTILS_EXPORT Q_DECL_EXPORT
179行目: 179行目:
  #include "Utils_global.h"
  #include "Utils_global.h"
  #include <iostream>
  #include <iostream>
//#ifdef Q_OS_WIN
//  #define UTILS_EXPORT __declspec(dllexport)
//#else
//  #define UTILS_EXPORT
//#endif
   
   
  extern "C" UTILS_EXPORT void SampleHello(int count)
  extern "C" UTILS_EXPORT void SampleHello(int count)

案内メニュー