Menu

#9 won't build with msvc80

closed-fixed
5
2010-03-13
2007-03-13
No

just grabbed the SVN version of jsoncpp and tried to build it using scons-local-0.96.95.zip on windows XP using visual studio 2005 and got this:

C:\jsoncpp>c:\python25\python scons.py platform="msvc80"
scons: Reading SConscript files ...
Building using PLATFORM = msvc80

scons: *** AttributeError `'NoneType' object has no attribute 'dir'' trying to e
valuate `${SOURCE.dir}'
File "C:\jsoncpp\scons-tools\doxygen.py", line 186, in generate

any advice?

Discussion

  • JL Flechon

    JL Flechon - 2007-04-26

    Logged In: YES
    user_id=1779523
    Originator: NO

    Same error found with msvc71 and scons-local-0.96.96.

     
  • Nobody/Anonymous

    Logged In: NO

    Just ditch SCONS. Create a new static library C++ project and add the files.

    There is very little config needed to compile this library

     
  • Rupert Bruce

    Rupert Bruce - 2007-05-26

    Logged In: YES
    user_id=777377
    Originator: NO

    I have the same error building in Fedora Core:
    $ python scons.py platform=linux-gcc
    scons: Reading SConscript files ...
    Building using PLATFORM = linux-gcc

    scons: *** AttributeError `'NoneType' object has no attribute 'dir'' trying to evaluate `${SOURCE.dir}'
    File "/home/eclipse/jsoncpp/trunk/jsoncpp/scons-tools/doxygen.py", line 186, in generate

    I have never seen scons (or used python) before but the jsoncpp code looks nice and clean so I'm just going to follow the advice of "nobody" and rip out the source files...

     
  • AndyY

    AndyY - 2007-10-03

    Logged In: YES
    user_id=1904496
    Originator: NO

    Same error found with msvc71 and scons-local-0.97

    1st problem seems to be in doxygen configuration. If all you want to do is build the lib and tests (and not documentation), then you do not need this. Comment out this line in jsoncpp\SConstruct:

    #env.Tool('doxygen')

    This then caused a 2nd problem which was a link / install error.

    link /nologo /dll /out:buildscons\msvc71\src\lib_json\json_vc71_mt_lib.dll /implib:buildscons\msvc71\src\lib_json\json_vc71_mt_lib.lib /LIBPATH:libs\msvc71 buildscons\msvc71\src\lib_json\json_reader.obj buildscons\msvc71\src\lib_json\json_value.obj buildscons\msvc71\src\lib_json\json_writer.obj
    Install file: "buildscons\msvc71\src\lib_json\json_vc71_mt_lib.lib" as "libs\msvc71\json_vc71_mt_lib.lib"
    scons: *** [libs\msvc71\json_vc71_mt_lib.lib] buildscons\msvc71\src\lib_json\json_vc71_mt_lib.lib: No such file or directory
    scons: building terminated because of errors.

    This issue appears to be Scons being 'smart' about its ability to Link / Install and not understand the dependencies properly. In function buildLibrary, swap around the order of the two link commands.

    def buildLibrary( env, target_sources, target_name ):
    shared_lib = env.SharedLibrary( target=target_name + '_${LIB_NAME_SUFFIX}',
    source=target_sources )
    static_lib = env.StaticLibrary( target=target_name + '_${LIB_NAME_SUFFIX}',
    source=target_sources )

    This will at least now get you building source and running the test suite.

     
  • Baptiste Lepilleur

    Doxygen generation has been removed from the scons script and can be generated using doxybuild.py instead.

     
  • Baptiste Lepilleur

    • labels: --> Compilation
    • assigned_to: nobody --> blep
    • status: open --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.