Results 1 to 11 of 11

Thread: problem creating a qjson0.lib

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: problem creating a qjson0.lib

    That's probably because it is called qjson.lib at a guess.

  2. #2
    Join Date
    Mar 2014
    Posts
    12
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: problem creating a qjson0.lib

    This is inside the pro file.
    win32-g++ {
    LIBS += ../qjson/build/lib/qjson0.dll
    }

    win32-msvc* {
    LIBS += ../qjson/build/lib/qjson0.lib
    }

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: problem creating a qjson0.lib

    So? What does the QJson project actually build?

  4. #4
    Join Date
    Mar 2014
    Posts
    12
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: problem creating a qjson0.lib

    It's supposed to build a library. I'm using the CLI way found here.

    at the "mingw32-make" command i get this error.
    C:\Users\George\Desktop\qjson\build>mingw32-make
    Scanning dependencies of target qjson_automoc
    [ 11%] Automoc for target qjson
    Generating moc_parserrunnable.cpp
    Generating moc_qobjecthelper.cpp
    C:/Users/George/Desktop/qjson/src/qobjecthelper.h(0): Note: No relevant classes
    found. No output generated.
    Generating moc_serializerrunnable.cpp
    [ 11%] Built target qjson_automoc
    Scanning dependencies of target qjson
    [ 22%] Building CXX object src/CMakeFiles/qjson.dir/parser.cpp.obj
    [ 33%] Building CXX object src/CMakeFiles/qjson.dir/qobjecthelper.cpp.obj
    [ 44%] Building CXX object src/CMakeFiles/qjson.dir/json_scanner.cpp.obj
    [ 55%] Building CXX object src/CMakeFiles/qjson.dir/json_parser.cc.obj
    [ 66%] Building CXX object src/CMakeFiles/qjson.dir/parserrunnable.cpp.obj
    [ 77%] Building CXX object src/CMakeFiles/qjson.dir/serializer.cpp.obj
    [ 88%] Building CXX object src/CMakeFiles/qjson.dir/serializerrunnable.cpp.obj
    [100%] Building CXX object src/CMakeFiles/qjson.dir/qjson_automoc.cpp.obj
    Linking CXX shared library libqjson.dll
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x4b): undefine
    d reference to `_imp___ZN8QVariantD1Ev'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0xa8): undefine
    d reference to `_imp___ZN8QVariantD1Ev'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0xc8): undefine
    d reference to `_imp___ZN8QVariantD1Ev'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x10f) : undefin
    ed reference to `_imp___ZN7QStringaSERKS_'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x213) : undefin
    ed reference to `_imp___ZNK9QIODevice6isOpenEv'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x298) : undefin
    ed reference to `_imp___ZNK14QMessageLogger8criticalEPKcz'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x2b6) : undefin
    ed reference to `_imp___ZNK9QIODevice10isReadableEv'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x302) : undefin
    ed reference to `_imp___ZNK14QMessageLogger8criticalEPKcz'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x49d) : undefin
    ed reference to `_imp___ZN8QVariantC1ERKS_'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x51d) : undefin
    ed reference to `_imp___ZN7QBufferC1EP7QObject'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x546) : undefin
    ed reference to `_imp___ZN7QBuffer4openE6QFlagsIN9QIODevice12OpenM odeFlagEE'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x577) : undefin
    ed reference to `_imp___ZN7QBuffer4seekEx'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x5a7) : undefin
    ed reference to `_imp___ZN7QBufferD1Ev'
    CMakeFiles\qjson.dir/objects.a(parser.cpp.obj):parser.cpp:(.text+0x5bb) : undefin
    ed reference to `_imp___ZN7QBufferD1Ev'
    c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: CMakeFiles
    \qjson.dir/objects.a(parser.cpp.obj): bad reloc address 0x10 in section `.text$_
    ZN14QMessageLoggerC1EPKciS1_[__ZN14QMessageLoggerC1EPKciS1_]'
    collect2.exe: error: ld returned 1 exit status
    src\CMakeFiles\qjson.dir\build.make:272: recipe for target 'src/libqjson.dll' fa
    iled
    mingw32-make[2]: *** [src/libqjson.dll] Error 1
    CMakeFiles\Makefile2:109: recipe for target 'src/CMakeFiles/qjson.dir/all' faile
    d
    mingw32-make[1]: *** [src/CMakeFiles/qjson.dir/all] Error 2
    Makefile:115: recipe for target 'all' failed
    mingw32-make: *** [all] Error 2
    Last edited by Qg90; 16th March 2014 at 11:55.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: problem creating a qjson0.lib

    So you are not using MSVC 2010, you are trying to build with MingW. QJson is failing to link because it looks like CMake has not correctly located Qt, or has created an incorrect linker command.

    If it had compiled and linked (it has not) then the resulting library file is libqjson.dll and the reference from the other project should not include the zero.
    Qt Code:
    1. LIBS += -Lc:/path/to/qjson -lqjson
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. problem in creating xml file.
    By Niamita in forum Qt Programming
    Replies: 1
    Last Post: 6th September 2011, 15:18
  2. Problem in creating a QFileSystemModel
    By kamlmish in forum Newbie
    Replies: 1
    Last Post: 16th December 2010, 15:03
  3. Problem When Creating my own Slot
    By Fatla in forum Qt Programming
    Replies: 12
    Last Post: 6th June 2008, 14:44
  4. creating dll problem -> no exports ...
    By vrudolf in forum Qt Programming
    Replies: 2
    Last Post: 30th July 2006, 16:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.