Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build testscanner.exe on Windows #63

Closed
drizt opened this issue Nov 20, 2014 · 0 comments · Fixed by #64
Closed

Can't build testscanner.exe on Windows #63

drizt opened this issue Nov 20, 2014 · 0 comments · Fixed by #64

Comments

@drizt
Copy link
Contributor

drizt commented Nov 20, 2014

I got this errors

CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x6428): undefined reference to `JSonScanner::JSonScanner(QIODevice*)'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x64a7): undefined reference to `JSonScanner::yylex(QVariant*, yy::location*)'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x6536): undefined reference to `JSonScanner::~JSonScanner()'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x6565): undefined reference to `JSonScanner::~JSonScanner()'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x6733): undefined reference to `JSonScanner::JSonScanner(QIODevice*)'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x674f): undefined reference to `JSonScanner::allowSpecialNumbers(bool)'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x67ce): undefined reference to `JSonScanner::yylex(QVariant*, yy::location*)'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x67f2): undefined reference to `JSonScanner::yylex(QVariant*, yy::location*)'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x6e76): undefined reference to `JSonScanner::~JSonScanner()'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x7149): undefined reference to `JSonScanner::~JSonScanner()'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x73e3): undefined reference to `JSonScanner::~JSonScanner()'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x7661): undefined reference to `JSonScanner::JSonScanner(QIODevice*)'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x7676): undefined reference to `JSonScanner::allowSpecialNumbers(bool)'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x76f5): undefined reference to `JSonScanner::yylex(QVariant*, yy::location*)'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x77d0): undefined reference to `JSonScanner::~JSonScanner()'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x7b53): undefined reference to `JSonScanner::~JSonScanner()'
CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj):testscanner.cpp:(.text+0x7b84): undefined reference to `JSonScanner::~JSonScanner()'
C:/Qt/Qt5.3.1/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: CMakeFiles\testscanner.dir/objects.a(testscanner.cpp.obj): bad reloc address 0x4 in section `.data'

Problem in JsonScanner class. It's internal class which hasn't QJSON_EXPORT. Windows requires some special attributes for classes/functions in shared libs. So JsonScanner must be defined with QJSON_EXPORT or testscanner must be linked against ./src/CMakeFiles/qjson.dir/json_scanner.cpp.obj.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant