Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Include<boost/lexicast.hpp> no such file directory ::issue
QtWS25 Last Chance

Include<boost/lexicast.hpp> no such file directory ::issue

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 2 Posters 9.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QT_QT_QT
    wrote on 12 May 2016, 06:37 last edited by
    #1

    Hey guys, I m working on with Boost and I have few problem that I have no clues how to solve it.
    I already build the Boost library, following this guideline. And also modify the pro.file according to the guideline, something like this:

    ***testing Crow.pro***
    
    QT += core
    QT -= gui
    
    CONFIG += c++11
    
    TARGET = TestingCrow
    CONFIG += console
    CONFIG -= app_bundle
    
    TEMPLATE = app
    
    INCLUDEPATH += C:/Users/USER/Desktop/boost_1_60_0
    
    LIBS += C:/boost_lib/boost/bin.v2/libs/date_time/build/gcc-mingw-4.8.1/release/link-static/threading-multi/libboost_date_time-mgw48-mt-1_60.a
    
    
    
    SOURCES += main.cpp
    
    HEADERS += \
        crow.h \
        settings.h \
        logging.h \
        routing.h \
        http_request.h \
        utility.h \
        middleware_context.h \
        http_server.h \
        common.h \
        http_response.h \
    
    
    
    

    by right , it should be working now. Some one here have experience include a Boost library in QT Creator? Your help will be appreciated! thanks!

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Paul Colby
      wrote on 12 May 2016, 06:50 last edited by
      #2

      Hi @QT_QT_QT,

      Include<boost/lexicast.hpp>

      Not sure if its just a typo in your post's subject line, but it's supposed to be boost/lexical_cast.hpp (on Boost 1.58 at least).

      Cheers.

      Q 1 Reply Last reply 12 May 2016, 06:52
      0
      • P Paul Colby
        12 May 2016, 06:50

        Hi @QT_QT_QT,

        Include<boost/lexicast.hpp>

        Not sure if its just a typo in your post's subject line, but it's supposed to be boost/lexical_cast.hpp (on Boost 1.58 at least).

        Cheers.

        Q Offline
        Q Offline
        QT_QT_QT
        wrote on 12 May 2016, 06:52 last edited by
        #3

        @Paul-Colby

        yes. Its a typo! Its typo when i copy and paste the code from IDE to this forum. My apologies . Btw, any clue on how to solve this problem?

        1 Reply Last reply
        0
        • P Offline
          P Offline
          Paul Colby
          wrote on 12 May 2016, 06:58 last edited by
          #4

          Thought that might be the case :)

          Have a look in C:/Users/USER/Desktop/boost_1_60_0 - do you see a boost directory there, containing a lexical_cast.hpp file? If not, search that directory for the file... I would expect it would actually be under something like C:/Users/USER/Desktop/boost_1_60_0/include, in which case correct your INCLUDEPATH accordingly.

          If the file is there, then show us the compiler command and output.

          Cheers.

          Q 1 Reply Last reply 12 May 2016, 07:04
          1
          • P Paul Colby
            12 May 2016, 06:58

            Thought that might be the case :)

            Have a look in C:/Users/USER/Desktop/boost_1_60_0 - do you see a boost directory there, containing a lexical_cast.hpp file? If not, search that directory for the file... I would expect it would actually be under something like C:/Users/USER/Desktop/boost_1_60_0/include, in which case correct your INCLUDEPATH accordingly.

            If the file is there, then show us the compiler command and output.

            Cheers.

            Q Offline
            Q Offline
            QT_QT_QT
            wrote on 12 May 2016, 07:04 last edited by
            #5

            @Paul-Colby

            Thank you for the reply, i have tested the solution that you suggested. However it did not work me :(
            lexicast is located in the boost folder

            at first my modification is like this :
            INCLUDEPATH += C:/Users/USER/Desktop/boost_1_60_0/boost/

            and then i thought must be the slashed, no need to include a slash at the end of the DIR . something like this:

            INCLUDEPATH += C:/Users/USER/Desktop/boost_1_60_0/boost

            both of the solutions is not working .

            1 Reply Last reply
            0
            • P Offline
              P Offline
              Paul Colby
              wrote on 12 May 2016, 07:06 last edited by
              #6

              do you see a boost directory there, containing a lexical_cast.hpp file?

              Did you find the lexical_cast.hpp file? And if so, what was the full path to it?

              Q 1 Reply Last reply 12 May 2016, 07:09
              0
              • P Paul Colby
                12 May 2016, 07:06

                do you see a boost directory there, containing a lexical_cast.hpp file?

                Did you find the lexical_cast.hpp file? And if so, what was the full path to it?

                Q Offline
                Q Offline
                QT_QT_QT
                wrote on 12 May 2016, 07:09 last edited by
                #7

                @Paul-Colby

                yeah, i saw lexical_cast.hpp inside folder boost . the full path is C:\Users\USER\Desktop\boost_1_60_0\boost

                thanks

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  Paul Colby
                  wrote on 12 May 2016, 07:13 last edited by
                  #8

                  @QT_QT_QT said:

                  yeah, i saw lexical_cast.hpp inside folder boost . the full path is C:\Users\USER\Desktop\boost_1_60_0\boost

                  Ok, so with:

                  INCLUDEPATH += C:/Users/USER/Desktop/boost_1_60_0
                  

                  Show us the compiler command and output (ie the contents of the "Compiler Output" pane, if using Qt Creator).

                  Cheers.

                  Q 1 Reply Last reply 12 May 2016, 07:17
                  0
                  • P Paul Colby
                    12 May 2016, 07:13

                    @QT_QT_QT said:

                    yeah, i saw lexical_cast.hpp inside folder boost . the full path is C:\Users\USER\Desktop\boost_1_60_0\boost

                    Ok, so with:

                    INCLUDEPATH += C:/Users/USER/Desktop/boost_1_60_0
                    

                    Show us the compiler command and output (ie the contents of the "Compiler Output" pane, if using Qt Creator).

                    Cheers.

                    Q Offline
                    Q Offline
                    QT_QT_QT
                    wrote on 12 May 2016, 07:17 last edited by
                    #9

                    @Paul-Colby

                    ok, So far i only got this error which is C1083: Cannot open such file :boost/lexical_cast.hpp':no such file or directory

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      Paul Colby
                      wrote on 12 May 2016, 07:22 last edited by
                      #10

                      Without seeing the compiler command being executed, it will be difficult to suggest what might be going wrong. Are you able to show us the compiler command?

                      Q 1 Reply Last reply 12 May 2016, 07:24
                      0
                      • P Paul Colby
                        12 May 2016, 07:22

                        Without seeing the compiler command being executed, it will be difficult to suggest what might be going wrong. Are you able to show us the compiler command?

                        Q Offline
                        Q Offline
                        QT_QT_QT
                        wrote on 12 May 2016, 07:24 last edited by
                        #11

                        @Paul-Colby

                        hi , what is that compiler command ? you want to know the command of building Boost this libraries?

                        1 Reply Last reply
                        0
                        • P Offline
                          P Offline
                          Paul Colby
                          wrote on 12 May 2016, 07:29 last edited by
                          #12

                          @QT_QT_QT said:

                          you want to know the command of building Boost this libraries?

                          No, I mean the command that results in the "C1083: Cannot open such file :boost/lexical_cast.hpp':no such file or directory" error. Given that you're on Windows (and that the C1083 code is Microsoft's compiler-specific), it will probably start with cl.exe or full\path\to\cl.exe.

                          If you're using Qt Creator, it should be in the Compiler Output pane, one to several lines before the error message.

                          1 Reply Last reply
                          0
                          • Q Offline
                            Q Offline
                            QT_QT_QT
                            wrote on 12 May 2016, 07:30 last edited by
                            #13

                            So, instead of this code C:/Users/USER/Desktop/boost_1_60_0/boots

                            i changed the code into something like this : C:\Users\USER\Desktop\boost_1_60_0\boost

                            After the modification , i got an error like this : C1902 :Program Database manager mismatch;please check your installation

                            1 Reply Last reply
                            0
                            • P Offline
                              P Offline
                              Paul Colby
                              wrote on 12 May 2016, 07:33 last edited by
                              #14

                              The compiler command will look something like:

                              	cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 /WX -GR -EHsc -DUNICODE -DWIN32 -DWIN64 -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DBUILD_USER=appveyor -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -DNDEBUG -I..\..\bipolar\src -I. -I..\..\bipolar\src -I..\..\bipolar\src\os -I..\..\bipolar\src\polar\v2 -I..\..\bipolar\src\protobuf -I..\..\bipolar\src\threads -I..\..\bipolar\src\widgets -I..\..\bipolar\src\widgets\gpx -I..\..\bipolar\src\widgets\hrm -I..\..\bipolar\src\widgets\tcx -I..\..\..\Qt\5.6\msvc2015_64\include -I..\..\..\Qt\5.6\msvc2015_64\include\QtWidgets -I..\..\..\Qt\5.6\msvc2015_64\include\QtGui -I..\..\..\Qt\5.6\msvc2015_64\include\QtANGLE -I..\..\..\Qt\5.6\msvc2015_64\include\QtXml -I..\..\..\Qt\5.6\msvc2015_64\include\QtCore -Irelease\tmp -I..\..\..\Qt\5.6\msvc2015_64\mkspecs\win32-msvc2015 -Forelease\tmp\ @C:\Users\appveyor\AppData\Local\Temp\1\nm6457.tmp
                              

                              Cheers.

                              1 Reply Last reply
                              0
                              • Q Offline
                                Q Offline
                                QT_QT_QT
                                wrote on 12 May 2016, 07:34 last edited by QT_QT_QT 5 Dec 2016, 07:36
                                #15

                                @Paul-Colby said:

                                ..\TestingCrow\main.cpp: fatal error C1902: Program database manager mismatch; please check your installation
                                jom: C:\Users\USER\Documents\build-TestingCrow-Desktop_Qt_5_6_0_MSVC2015_64bit-Debug\Makefile.Debug [debug\main.obj] Error 2
                                jom: C:\Users\USER\Documents\build-TestingCrow-Desktop_Qt_5_6_0_MSVC2015_64bit-Debug\Makefile [debug] Error 2
                                15:33:49: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
                                Error while building/deploying project TestingCrow (kit: Desktop Qt 5.6.0 MSVC2015 64bit)
                                When executing step "Make"

                                The message i access it from "compile output" WIndows->output panes->compile output

                                1 Reply Last reply
                                0
                                • Q Offline
                                  Q Offline
                                  QT_QT_QT
                                  wrote on 12 May 2016, 08:45 last edited by
                                  #16

                                  INCLUDEPATH += C:/Users/USER/Desktop/boost_1_60_0/

                                  LIBS += -L"C:/Users/USER/Desktop/boost_1_60_0/boost" -l Lexical_Cast

                                  was trying this solution , however its not working . Some one from here please help me .

                                  1 Reply Last reply
                                  1

                                  3/16

                                  12 May 2016, 06:52

                                  13 unread
                                  • Login

                                  • Login or register to search.
                                  3 out of 16
                                  • First post
                                    3/16
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved