none
how to use boots in cross platform c++ applications RRS feed

  • Question

  • hi,

    I am trying to use boost library in visual studios cross platform C++ app that is compiling on my raspberry pi running linux. I have compiled boost on windows and added them to the linker and compiler. It all works ok when i wright a small app on windows . If i want to write programs programs on my PI do i need to compile any external librarys on the that OS before i can use them ? 

    if so how do i go about it ? 

    thank you 

    • Moved by Baron Bi Thursday, June 21, 2018 6:04 AM Third-party library issue
    Friday, June 8, 2018 9:51 AM

All replies

  • Hello,

    do you get any error messages?

    For general questions about programming the Raspberry pi, you should ask in its forum: https://www.raspberrypi.org/forums/

    https://www.raspberrypi.org/forums/viewforum.php?f=33

    https://www.raspberrypi.org/forums/viewtopic.php?f=33&t=215377

    Regards, Guido




    Friday, June 8, 2018 10:00 AM
  • OK thanks you. I am also getting issues with compiling on windows now. I am following this video://www.youtube.com/watch?v=CJQ1ybhP7Tw but still getting errors any idea why this can be ?

    

     ● Started at 12:34:35
    1>------ Build started: Project: boost, Configuration: Debug Win32 ------
    1>boost.cpp
    1>c:\users\benvo\source\repos\boost\boost\boost.cpp(12): error C2871: 'boost': a namespace with this name does not exist
    1>c:\users\benvo\source\repos\boost\boost\boost.cpp(16): error C2065: 'optional': undeclared identifier
    1>c:\users\benvo\source\repos\boost\boost\boost.cpp(16): error C2062: type 'int' unexpected
    1>Done building project "boost.vcxproj" -- FAILED.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    ● Finished at 12:34:35 (total time 0.56s)
    Saturday, June 9, 2018 2:43 AM
  • Hi,

    thanks for posting here.

    >>OK thanks you. I am also getting issues with compiling on windows now. I am following this video://www.youtube.com/watch?v=CJQ1ybhP7Tw but still getting errors any idea why this can be ?

    It seems you haven't included the boost headers in your project correctly.

    Here is a document about cross-platform development with Linux, you could refer to.

    https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/

    Besides, this forum is about c++ development with Microsoft products. For your case which is more related to boost libraries, please post on this forum below.

    https://www.boost.org/

    Your understanding and cooperation will be grateful.

    Best Regards,

    Baron Bi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 11, 2018 8:02 AM