[AGENT++] Compiler error in win32 with vc++6.0

Cheney, Christian CheneyC at wsdot.wa.gov
Thu Mar 4 17:47:10 CET 2004


Just out of curiosity, did you use the VC7 to VC6 project conversion tool,
or did you build your project from scratch?
 
I compiled it as a win32 dll, multithreaded dll, with the following
preprocessor definitions (release build):
 
NDEBUG,WIN32,_MBCS,_USRDLL,SNMP_PP_DLL,SNMP_PP_EXPORTS
 
HTH

-----Original Message-----
From: Marcos Cacabelos Prol [mailto:marcoscp at meta4.com]
Sent: Thursday, March 04, 2004 12:02 AM
To: Cheney, Christian; agentpp at agentpp.org
Subject: RE: [AGENT++] Compiler error in win32 with vc++6.0


I'm using vc++6 sp3.
I'm compiling as win32 dll, and using runtime library multithreaded dll.
 
Thanks.
 

-----Original Message-----
From: Cheney, Christian [mailto:CheneyC at wsdot.wa.gov]
Sent: miércoles 3 de marzo de 2004 18:18
To: Marcos Cacabelos Prol; agentpp at agentpp.org
Subject: RE: [AGENT++] Compiler error in win32 with vc++6.0


I've compiled it just fine with vc++ 6, sp5.
 
Are you compiling the library as a win32 static library or dll?

-----Original Message-----
From: Marcos Cacabelos Prol [mailto:marcoscp at meta4.com]
Sent: Wednesday, March 03, 2004 8:57 AM
To: agentpp at agentpp.org
Subject: RE: [AGENT++] Compiler error in win32 with vc++6.0


If I only remove the DLLOPT key, its compile, but I get multiple link
errors. The operator >= seem to be defined in each .obj file.
 
I I define the function with the declaration, and comment the inline at the
end, it works fine.
  /**
   * Overloaded greater than >= operator.
   */
  DLLOPT friend int operator>=(const Oid &lhs, const Oid &rhs)
    {
        return (!(lhs<rhs));   // just invert existing <
    }

 
May be a bug in the compiler.
Marcos

-----Original Message-----
From: agentpp-bounces at agentpp.org [mailto:agentpp-bounces at agentpp.org]On
Behalf Of Marcos Cacabelos Prol
Sent: miércoles 3 de marzo de 2004 17:19
To: agentpp at agentpp.org
Subject: [AGENT++] Compiler error in win32 with vc++6.0



I am using the snmp++v3.2.10a version of snmp. 
I have compiled this library with vc++6.0. 

When I use this library in my project, I get the next error: 
        snmp_pp\include\oid.h(415) : error C2491: '>=' : definition of
dllimport function not allowed 

In this file we can see: 
inline int operator>=(const Oid &x, const Oid &y) 
{ 
  return (!(x<y));   // just invert existing < 
} 

This code was not here in previous versions of iod.h file. If I remove
DLLOPT from the method declaration, the code compiles OK.

  /** 
   * Overloaded greater than >= operator. 
   */ 
   DLLOPT friend int operator>=(const Oid &lhs, const Oid &rhs); 


What is the reason to make this operator inline? 
Is this a bug? 

Marcos 

--- 
Marcos Cacabelos Prol 

Direct Phone (34) 91 602 53 07 
marcoscp at meta4.com 

Meta4 
A company of the ADONIX Group 

Centro Europa Empresarial - Edf. Roma 
C/ Rozabella, 8 
28230 Las Rozas - MADRID 
ESPAÑA 
Tel.: 91.634.85.00 - Fax: 91.634.86.68 

http://www.meta4.com <http://www.meta4.com>  

Privileged/Confidential Information may be contained in this message.  If
you are not the addressee of this message, or responsible for its delivery
to such person, please destroy this message and kindly notify the sender by
reply email. Opinions, conclusions and any other information contained in
this message that do not relate to the official business of Meta4 shall be
understood as neither given nor endorsed by it. Unauthorized copying or
delivery to non-adressees is not permitted.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.agentpp.org/pipermail/agentpp/attachments/20040304/10bf35f7/attachment.htm 


More information about the AGENTPP mailing list