Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8523977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:33:42+00:00 2026-06-11T07:33:42+00:00

I wanna to compile my c plus plus project that using boost library with

  • 0

I wanna to compile my c plus plus project that using boost library with WDK rather than VisualStudio.

My computer’s OS is Windows7-64bit, the WDK version is 7.6 and boost library version is 1.51

Once I compile my source code project, the WDK compiler will occure an error:

e:\lib\boost_1_51_0\boost\array.hpp(72) : error C2039: 'ptrdiff_t' : is not a member of 'std' .

Whole project’s file contents are as follow:

File sources:

TARGETTYPE=PROGRAM
TARGETNAME=helloworld

UMENTRY=main
USE_MSVCRT=1
USE_NATIVE_EH=1

#
# use iostream package and STL
#
USE_IOSTREAM=1
USE_STL=1
STL_VER=70

#
# my boost library root directory
#
BOOST_INC_PATH=E:\lib\boost_1_51_0

INCLUDES=$(BOOST_INC_PATH)
TARGETLIBS=$(SDK_LIB_PATH)\user32.lib

SOURCES=HelloWorld.cpp

UMTYPE=console
UMBASE=0x4000000

File HelloWorld.cpp:

#include <iostream>
#include <vector>
#include <string>
#include <boost/array.hpp> 

void InvokeVector()
{
    //invoke STL's vector
    std::vector<std::string> vec;
    vec.push_back("Entry ");
    vec.push_back("of ");
    vec.push_back("Vector");
    vec.push_back("……\n");
    //print vec
    for (int i=0; i<vec.size(); i++) {
        std::cout<<vec.at(i);
    }
}

void InvokeBoost()
{
    //invoke Boost's array<T, N>
    boost::array<int, 3> arr = {1, 2, 3};
    for (int i=0; i<arr.size(); i++) {
        std::cout<<"arr["<<i<<"]"<<"is" <<arr[i]<<std::endl;
    }
}

int main()
{
//  InvokeVector();  //run normally
    InvokeBoost(); //it will occure an error
    return 0;
}

Could you please teach me how to solve this problem? Any help will be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:33:43+00:00Added an answer on June 11, 2026 at 7:33 am

    Short answer: No.

    But you can port some.

    It’s well explained here : The NT Insider:Guest Article: C++ in an NT Driver

    One of the main problems with C++ in the
    kernel is that most of the “nice” features of the language are not
    directly available in that mode. Some are easy to recreate and we will
    see how to do that. However, some features should be forgotten such as
    C++ exceptions, which are not the same as kernel exceptions.

    Such features have to be forgotten simply because there is no support
    for them in kernel mode. Translation: does not compile. If you have
    the time and energy you may attempt to port them to kernel mode, but
    frankly, exceptions are too slow for kernel mode. This will have an
    impact on your C++ coding style, which is something you should keep in
    mind.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanna write a little c++ program using libcurl. It's for a school project
I wanna check sharepoint title first and see if the lib doesn't have that
I wanna use powershell to get all the file in sharepoint library EM_DOC_LIBRARY and
I wanna run selenium tests from TeamCity using Maven at Linux server without display.
I wanna to detect an input tag that its name is: some[en] in jquery.
Ok this is a really weird problem. I wanna start off by saying that
I wanna use Google Closure Compiler to compile my js codes.I write a makefile
I'm using node.js in my server side. Now I wanna run some binary file
i wanna make my own application to reach my mails. i'm using office 365
I wanna implement divide and conquer using pthread, but I don't know what will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.