Results 1 to 5 of 5

Thread: Using flex with Qt4

  1. #1
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Using flex with Qt4

    Hi,

    I'm developing an named.conf parser with flex. Anyone can help me to build it?
    I have no idea about how to link it with Qt4. There is any tutorial or howto?

    Thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Using flex with Qt4

    Have you noticed LEXSOURCES?
    J-P Nurmi

  3. #3
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Using flex with Qt4

    I have added the file to LEXSOURCES but does not compile, this is the exit of the make:

    Qt Code:
    1. named.conf_lex.cpp:118: error: expected initializer before ‘.’ token
    2. named.conf_lex.cpp:119: error: expected initializer before ‘.’ token
    3. named.conf_lex.cpp:242: error: expected initializer before ‘.’ token
    4. named.conf_lex.cpp:254: error: expected initializer before ‘.’ token
    5. named.conf_lex.cpp:256: error: expected initializer before ‘.’ token
    6. named.conf_lex.cpp:257: error: expected initializer before ‘.’ token
    7. named.conf_lex.cpp:258: error: expected initializer before ‘.’ token
    8. named.conf_lex.cpp:259: error: expected initializer before ‘.’ token
    9. named.conf_lex.cpp:260: error: expected initializer before ‘.’ token
    10. named.conf_lex.cpp:261: error: expected initializer before ‘.’ token
    11. named.conf_lex.cpp:264: error: expected initializer before ‘.’ token
    12. named.conf_lex.cpp:265: error: expected initializer before ‘.’ token
    13. named.conf_lex.cpp:266: error: expected initializer before ‘.’ token
    14. named.conf_lex.cpp:294: error: expected initializer before ‘.’ token
    15. named.conf_lex.cpp:296: error: expected initializer before ‘.’ token
    16. named.conf_lex.cpp:442: error: expected initializer before ‘.’ token
    17. lex.named.conf.c:592: error: expected initializer before ‘.’ token
    18. named.conf_lex.cpp:227: warning: ‘yy_current_buffer’ defined but not used
    19. named.conf_lex.cpp:237: warning: ‘yy_hold_char’ defined but not used
    20. named.conf_lex.cpp:239: warning: ‘yy_n_chars’ defined but not used
    21. named.conf_lex.cpp:245: warning: ‘yy_c_buf_p’ defined but not used
    22. named.conf_lex.cpp:246: warning: ‘yy_init’ defined but not used
    23. named.conf_lex.cpp:247: warning: ‘yy_start’ defined but not used
    24. named.conf_lex.cpp:252: warning: ‘yy_did_buffer_switch_on_eof’ defined but not used
    25. named.conf_lex.cpp:268: warning: ‘void* yy_flex_alloc(yy_size_t)’ declared ‘static’ but never defined
    26. named.conf_lex.cpp:269: warning: ‘void* yy_flex_realloc(void*, yy_size_t)’ declared ‘static’ but never defined
    27. named.conf_lex.cpp:270: warning: ‘void yy_flex_free(void*)’ declared ‘static’ but never defined
    28. named.conf_lex.cpp:299: warning: ‘yy_state_type yy_get_previous_state()’ declared ‘static’ but never defined
    29. named.conf_lex.cpp:300: warning: ‘yy_state_type yy_try_NUL_trans(yy_state_type)’ declared ‘static’ but never defined
    30. named.conf_lex.cpp:301: warning: ‘int yy_get_next_buffer()’ declared ‘static’ but never defined
    31. named.conf_lex.cpp:302: warning: ‘void yy_fatal_error(const char*)’ declared ‘static’ but never defined
    32. named.conf_lex.cpp:432: warning: ‘yy_last_accepting_state’ defined but not used
    33. named.conf_lex.cpp:433: warning: ‘yy_last_accepting_cpos’ defined but not used
    34. lex.named.conf.c:462: warning: ‘void yyunput(int, char*)’ declared ‘static’ but never defined
    35. lex.named.conf.c:475: warning: ‘int yyinput()’ declared ‘static’ but never defined
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Using flex with Qt4

    When I build manually the lexer it works.

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Using flex with Qt4

    What is the difference between the commands? I mean the one run by make (written by qmake to the Makefile) and the one you run by hand.
    J-P Nurmi

Similar Threads

  1. Flex, Bison and qmake
    By Hydragyrum in forum Qt Programming
    Replies: 5
    Last Post: 2nd May 2011, 15:52

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.