Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Posts
    4

    Red face Unanswered: occi/MFC in debug mode

    hello all,
    i am having a hell of a time getting occi to compile with mfc in debug mode. release mode is fine but the debug mode is complaining about the new(__FILE__, __LINE__) version. at this point i dont care about the leak detection code built into the debug version so how do i get around it. i cant figure out how to work around it. here is the error:

    c:\oracle\ora92\oci\include\occiobjects.h(113) : error C2059: syntax error : 'string'
    c:\oracle\ora92\oci\include\occiobjects.h(113) : error C2091: function returns function
    c:\oracle\ora92\oci\include\occiobjects.h(113) : error C2802: static member 'operator new' has no formal parameters
    c:\oracle\ora92\oci\include\occiobjects.h(114) : error C2059: syntax error : 'string'
    c:\oracle\ora92\oci\include\occiobjects.h(115) : error C2091: function returns function
    c:\oracle\ora92\oci\include\occiobjects.h(115) : error C2556: 'void *(__cdecl *__cdecl oracle:cci::PObject:perator new(void))(unsigned int,const class oracle:cci::Connection *,const class std::basic_string<char,struct std::char_traits<char>,cl
    ass std::allocator<char> > &,const char *)' : overloaded function differs only by return type from 'void *(__cdecl *__cdecl oracle:cci::PObject:perator new(void))(unsigned int)'
    c:\oracle\ora92\oci\include\occiobjects.h(113) : see declaration of 'new'
    c:\oracle\ora92\oci\include\occiobjects.h(116) : error C2059: syntax error : 'string'
    c:\oracle\ora92\oci\include\occiobjects.h(116) : error C2091: function returns function
    c:\oracle\ora92\oci\include\occiobjects.h(116) : error C2556: 'void *(__cdecl *__cdecl oracle:cci::PObject:perator new(void))(unsigned int,void *)' : overloaded function differs only by return type from 'void *(__cdecl *__cdecl oracle:cci::POb
    ject:perator new(void))(unsigned int)'
    c:\oracle\ora92\oci\include\occiobjects.h(113) : see declaration of 'new'

  2. #2
    Join Date
    Oct 2002
    Posts
    4
    ok i figured it out.
    you have to put all stl includes above mfc first.
    second you have to undefine boolean
    #undef boolean
    because oracle defines this as an int and if you dont undefine it, the wtypes.h file will bitch about int after char is illegal.

    hope this helps someone else besides me.

    let me know if it does.

Posting Permissions

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