Results 1 to 8 of 8

Thread: __forceinline

  1. #1

    Thread Starter
    Hyperactive Member noble's Avatar
    Join Date
    Nov 2000
    Location
    Philly
    Posts
    471

    __forceinline

    does anyone know if the __forceinline declaration is part of the
    SDK or something? I'm attempting to build a project and it's
    complaining about every occurrence of __forceinline. i did not find
    documentation for this in the packaged MS help files.

    any help on this would be greatly appreciated
    Bababooey
    Tatatoothy
    Mamamonkey

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    what version of MSVC are you using? if you aren't using MSVC then its inline
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    Hyperactive Member noble's Avatar
    Join Date
    Nov 2000
    Location
    Philly
    Posts
    471
    i'm using msvc 5 but i know the project was created in msvc 6

    i attempted to use the lib file from it but i have to build a version
    of the dll so i can use the lib with vc 5.

    it complains heavily of this function
    Bababooey
    Tatatoothy
    Mamamonkey

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    hmm i don't have msvc5 but i guess it doesn't have __forceinline then, you can always try inline instead, what does it say?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5

    Thread Starter
    Hyperactive Member noble's Avatar
    Join Date
    Nov 2000
    Location
    Philly
    Posts
    471
    First it complains about the __forceinline declaration
    the errors following are probably a result of the __forceinline
    error but here's the specific error for __forceinline

    Code:
    buffer.h(22) : error C2501: '__forceinline' : missing decl-specifiers

    if i replace all occurrences of __forceinline with the inline or
    __inline declaration, i get 100 or more errors that complain
    that there are errors in the atlctl.cpp file which i never even touch.

    Code:
    C:\Program Files\DevStudio\VC\ATL\include\atlctl.cpp(19) : error C2653: 'CComDispatchDriver' : is not a class or namespace name
    C:\Program Files\DevStudio\VC\ATL\include\atlctl.cpp(29) : error C2653: 'CComDispatchDriver' : is not a class or namespace name
    C:\Program Files\DevStudio\VC\ATL\include\atlctl.cpp(56) : error C2653: 'CFirePropNotifyEvent' : is not a class or namespace name
    C:\Program Files\DevStudio\VC\ATL\include\atlctl.cpp(86) : error C2653: 'CFirePropNotifyEvent' : is not a class or namespace name
    C:\Program Files\DevStudio\VC\ATL\include\atlctl.cpp(116) : error C2653: 'CComControlBase' : is not a class or namespace name
    C:\Program Files\DevStudio\VC\ATL\include\atlctl.cpp(133) : error C2065: 'ControlQueryInterface' : undeclared identifier
    C:\Program Files\DevStudio\VC\ATL\include\atlctl.cpp(198) : error C2653: 'CComControlBase' : is not a class or namespace name
    C:\Program Files\DevStudio\VC\ATL\include\atlctl.cpp(199) : error C2061: syntax error : identifier 'ATL_PROPMAP_ENTRY'
    .......

    ghey

    thx for any help
    Bababooey
    Tatatoothy
    Mamamonkey

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Maybe ATL changed from VC5 to VC6? Few compilers provide upward-compatibility

    inline is a C++ keyword
    __inline is a VC6 keyword (works in C too, does not work in VC5)
    _inline is a VC5 keyword (works in C and VC6 too)
    __forceinline is a VC6 keyword (works in C too, does not work in VC5)
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    But if you want a lib with downward compatibility to VC5 you can create it in VC6 with this linker option:
    /LINK50COMPAT

    This will tell the linker that the lib must be compatible with VC5
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  8. #8

    Thread Starter
    Hyperactive Member noble's Avatar
    Join Date
    Nov 2000
    Location
    Philly
    Posts
    471
    thx for your help cornedbee, i will submit a request for the
    author of the program to make it 5.0 compatible
    Bababooey
    Tatatoothy
    Mamamonkey

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