Hi,
it is not problem of Synapse, but BCB2007.
Change line to:
extern PACKAGE TIp6Bytes * __fastcall StrToIp6(AnsiString value);
and recompile your project. Then try change options like this:
Project options->C++ Compiler->Precompiled Heareds->Use precompiled
headers->Use but dont generate
or ->Cache precompiled headers=true
st.
------------ Původní zpráva ------------
Od: Roddy Pratt <[email protected]>
Předmět: [Synalist] Problem with Release #39 and BCB2007
Datum: 15.11.2010 21:02:32
---------------------------------------------
I'm trying to use Synapse Release #39 with BCB2007, and have hit a
problem due to IPV6 enhancements.
In synaip.pas, the following
function StrToIp6(value: string): TIp6Bytes;
... creates this in the .hpp file...
typedef Byte TIp6Bytes[16];
...
extern PACKAGE TIp6Bytes __fastcall StrToIp6(AnsiString value);
...which fails to compile:
[C++ Error] Synaip.hpp(36): E2091 Functions cannot return arrays or
functions
Full parser context
snmpdevice.cpp(15): #include ..\..\Components\synapse\lib\
snmpsend.hpp
snmpsend.hpp(19): #include ..\..\Components\synapse\lib\Blcksock.
hpp
Blcksock.hpp(23): #include ..\..\Components\synapse\lib\Synaip.
hpp
Synaip.hpp(23): namespace Synaip
This is a C++ limititation, really. The only ways round this that I
can see are to either change StrToIp6 to accept a VAR parameter
which is used for the return value, or to make TIp6Bytes be a record
containing the array of bytes.
Any other ideas?
- Roddy
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public