CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Aug 1999
    Posts
    33

    "You need a Windows 2000 or later to run this stub..."?

    I am porting to vs.net 2003. I get the following compile time error:

    fatal error C1189: #error : You need a Windows 2000 or later to run this stub because it uses these features:

    the error is caused by the following code generated by MIDL.

    #if !(TARGET_IS_NT50_OR_LATER)
    #error You need a Windows 2000 or later to run this stub because it uses these features:
    #error /robust command line switch.
    #error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
    #error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
    #endif

    I searched for TARGET_IS_NT50_OR_LATER and it is only in files generated by the MIDL.

    The funny thing is that I am compiling on XP PRO! What do I not have set correctly?

    thanx

  2. #2
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815
    This has nothing to do with the system you are compiling under, but the target system you are compiling for. Apparently, you are using a feature which is only available on Windows 2000 and later, but the /target compiler switch for the MIDL compiler is set to NT40. If you are using features only available under Win 2000 or XP, you should set /target to NT50 or NT51, respectively.

  3. #3
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    Originally posted by gstercken
    This has nothing to do with the system you are compiling under, but the target system you are compiling for. Apparently, you are using a feature which is only available on Windows 2000 and later, but the /target compiler switch for the MIDL compiler is set to NT40. If you are using features only available under Win 2000 or XP, you should set /target to NT50 or NT51, respectively.
    Just want to point out that the documentation says 'windows 2000' only, and XP may very well not support the switch. Don't have XP so can't tell, but midl /? and look at the runtime error checking by stubs, shouldn't be there if it's not supported (one would hope)

  4. #4
    Join Date
    Jul 2002
    Location
    St. Louis, MO
    Posts
    484
    It should run under XP. XP is Windows 5.1

  5. #5
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    Originally posted by HeartBreakKid
    It should run under XP. XP is Windows 5.1
    My point was/is that it does not have to be migrated from 5.0 to 5.1. Not everything is.

    Just curious because of the documentation, usually as you know, it's windows 2000 and later. Not saying that the documentation just isn't complete, but you never know.

  6. #6
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    Well was gonna go check msdn to see if I have the latests docs on this....but well I sure hope it's just a connection burping...cause if this is fast...dare I ask what is slow? (watching the hourglass for 5 minutes....twice)

    We’ve Recently Updated Search
    We've spent the last few months working with the Microsoft.com Search team to improve the experience of searching on MSDN. Our goal: to make it easier and faster for you to find what you need, so you can get back to writing great code.

  7. #7
    Join Date
    Aug 1999
    Posts
    33

    How do I change the target system?

    I am kinda new to VS.net 2003, so how do I go in and change the MIDL compiler to use the target of NT50 rather than NT40? I am going through the properties now and dont see it readily....

    thanx

  8. #8
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537

    Re: How do I change the target system?

    Originally posted by roujesky
    I am kinda new to VS.net 2003, so how do I go in and change the MIDL compiler to use the target of NT50 rather than NT40? I am going through the properties now and dont see it readily....

    thanx
    Hmm there is no /target switch as I know of it, not sure what gstercken is talking about. XP thing?

    there is a

    /win32 Target environment is Microsoft Windows 32-bit (NT)
    switch.

  9. #9
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815

    Re: Re: How do I change the target system?

    Originally posted by Mick_2002
    Hmm there is no /target switch as I know of it, not sure what gstercken is talking about. XP thing?
    No, just a command line switch for the MIDL compiler: MIDL Command-Line Reference on MSDN

  10. #10
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537

    Re: Re: Re: How do I change the target system?

    Originally posted by gstercken
    No, just a command line switch for the MIDL compiler: MIDL Command-Line Reference on MSDN
    Too hard for them to write that to stdout I guess


    Midl /? <got nothing>

    Bow

  11. #11
    Join Date
    Aug 1999
    Posts
    33

    doesn't make sense with microsoft...

    I just opened this project/workspace that was created in vc6. All I do is just build. I wonder where the midl compiler is kicked off? Microsoft is not making this easy....

  12. #12
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537

    Re: doesn't make sense with microsoft...

    Originally posted by roujesky
    I just opened this project/workspace that was created in vc6. All I do is just build. I wonder where the midl compiler is kicked off? Microsoft is not making this easy....
    If you create an ATL project, you can set the options in the MIDL tab.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured