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



  • 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!



  • 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.



  • @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?



  • 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.



  • @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 .



  • 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?



  • @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



  • @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.



  • @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



  • 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?



  • @Paul-Colby

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



  • @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.



  • 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



  • 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.



  • @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



  • 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 .


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.