Menu

Log to a file using setFilePath

Help
Anonymous
2012-05-30
2013-05-20
  • Anonymous

    Anonymous - 2012-05-30

    HI,

    I tried the exemple from pantheios to log to a file but can't manage to make it work.
    Messages are correctly displayed in the console but the log file isn't created.

    I can see the log in the console but the log file is never created. The pantheios_be_file_setFilePath is returning me a -4

    #define PANTHEIOS_INIT_RC_UNSPECIFIED_FAILURE   (-4)
    Specifies that the operation failed in an unspecified manner.

    Source : http://www.pantheios.org/doc/html/group__group____init__codes.html

    I think the "-4" I got is in the file : pantheios-1.0.1-beta213/src/backends/bec.file.cpp    line 756, in the function : PANTHEIOS_CALL(int) pantheios_be_file_setFilePath(…, …, …, …)

    if(0 == s_rc)
    {
    return PANTHEIOS_INIT_RC_UNSPECIFIED_FAILURE;
    }

    Here is my .cpp and Makefile, i'm on debian with gcc 4.4

    makefile : http://pastebin.com/MH6QGGVm
    cpp file : http://pastebin.com/S53b47cq

     
  • Anonymous

    Anonymous - 2012-05-31

    Ok, i solved my problem, i seem the -lpantheios.1.be.file.gcc44 SHOULD BE linked before the -lpantheios.be.fprintf.gcc44

    Here is the change,  the library link order : http://pastebin.com/ESRQNMBz

     

Log in to post a comment.