CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2014
    Posts
    3

    error C2371: 'BOOKMARK' : redefinition; different basic types

    error C2371: 'BOOKMARK' : redefinition; different basic types C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\mapidefs.h 1142

    When I Build 64 bit dll then gets above error.

    I used two approach in link http://mariusbancila.ro/blog/2011/06...n-of-bookmark/

    please help how to resolve above error.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: error C2371: 'BOOKMARK' : redefinition; different basic types

    Victor Nijegorodov

  3. #3
    Join Date
    Apr 2014
    Posts
    3

    Re: error C2371: 'BOOKMARK' : redefinition; different basic types

    I used this solution but it get same error

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: error C2371: 'BOOKMARK' : redefinition; different basic types

    Quote Originally Posted by vijaykumbhani View Post
    I used this solution but it get same error
    Perhaps you "used this solution" not properly?
    Victor Nijegorodov

  5. #5
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,923

    Re: error C2371: 'BOOKMARK' : redefinition; different basic types

    From the link in post #2. Note that the proposed workaround using defines doesn't work. Also it is a little easier if you use
    Code:
    #include <windows.h>
    #include <MAPIDefS.h>
     
    namespace SQL
    {
    #include <sqltypes.h>
    }
    
    using namespace SQL;
    as otherwise you can get issues with redefinition of _errno etc.

    then use
    Code:
    ::BOOKMARK	bookmark = 1;
    SQL::BOOKMARK sbookmark = 0;
    when you want to use the different bookmarks.
    Last edited by 2kaud; April 25th, 2014 at 05:54 AM.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

Tags for this Thread

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