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

Marcos Cacabelos Prol marcoscp at meta4.com
Thu Mar 4 09:01:54 CET 2004


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 

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/49319fac/attachment.htm 


More information about the AGENTPP mailing list