On Windows you have this coming from Qt:
Qt Code:
  1. # define Q_DECL_EXPORT __declspec(dllexport)
  2. # define Q_DECL_IMPORT __declspec(dllimport)
To copy to clipboard, switch view to plain text mode 
as you can see, you ended up with the value of Q_DECL_IMPORT, which can only mean that your code:
Qt Code:
  1. #ifdef BUILD_TEST_DLL
  2. #define TEST_IMPORT_EXPORT Q_DECL_EXPORT
  3. #else
  4. #define TEST_IMPORT_EXPORT Q_DECL_IMPORT
  5. #endif
To copy to clipboard, switch view to plain text mode 
was preprocessed when BUILD_TEST_DLL was not defined.

If you add BUILD_TEST_DLL in your PRO file DEFINES, then you must rerun qmake to rewrite the Makefile or the value will not make it to the compiler.