after Migration of our GCC compatible sources to MSVC I've some trouble to get the CPPUnit tests
runable. If those tests tries to access hidden members (private, protected) using preprocessor
macros like this on exported classes:
#define protected public #include <brGraphics/brImage.h> #undef protected
And tries to access a hidden method like this:
protected: unsigned int getNativePixelColor(const brColor& color);
I got the follwing error:
Quote
2>brImageTest.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: unsigned int __thiscall binrev::brGraphics::brImage::getNativePixelColor(class binrev::brGraphics::brColor const &)" (__imp_?getNativePixelColor@brImage@brGraphics@binrev@@QAEIABVbrColor@23@@Z)" in Funktion ""public: void __thiscall binrev::test::brImageTest::testGetNativePixelColor(void)" (?testGetNativePixelColor@brImageTest@test@binrev@@QAEXXZ)".
2>C:\binrev\binrevengine\modules\brGraphics\branches\hellhound-dev\bin\Debug\brGraphics_tests.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.
2>C:\binrev\binrevengine\modules\brGraphics\branches\hellhound-dev\bin\Debug\brGraphics_tests.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.
I tried to define the related methods public, in that case everything is running fine.
Any suggestions how I could solve this issue without making those methods public?
Best regards
Hellhound












