Page 1 of 2

7.08 and 7.07 C++ example code compile failure

Posted: Fri Jul 07, 2006 2:01 pm
by 9346303
Using the Borland Developer Studio 2006 under C++ and the example files, I used Project->Build All menu selection.

in file Teegeometry.hpp(263): at line 263
extern PACKAGE TAffineDblVector __fastcall MakeAffineDblVector(double const * V, const int V_Size);

The following C++ Error, E2091 Functions cannot return arrays or functions

Since this is the original source code. I do not want to modify it to get around the problem (my fix will not be in the next version).

So I contacted you for the best plan for how to change the code.

Thanks in advance.

Posted: Tue Jul 18, 2006 1:27 pm
by Pep
Hi Scott,

I've just sent the latest demo sources via mail to check if it's working fine for you. Here I've test them and worked fine.

I did not get the "mail" => email

Posted: Tue Jul 18, 2006 10:10 pm
by 9346303
Josep,
I did not see any email from you today!?

Posted: Wed Jul 19, 2006 9:05 am
by narcis
Hi scottpj,

I've just forwarded you the e-mail Pep sent you yesterday. I've sent it to your forums e-mail address which is the same you used to e-mail Pep. If you are still not receiving it please let us know. Could it be that it got trapped by an anti-spam filter or firewall?

Your email was added to my spam list, have now removed

Posted: Wed Jul 19, 2006 1:11 pm
by 9346303
Marcis,
I have removed the automatic spam assignment for your domain and user name. I hope that is what the problem was. Josep was sending emails directly while we worked out the details of the problem with the software. These emails are not posted. I did login to your email system and I found nothing there. Please advise on how to proceed.

Thanks in advance for your time and trouble.

Posted: Wed Jul 19, 2006 1:16 pm
by narcis
Hi scottpj,

Ok, I sent the e-mail again to check if the automatic spam assignment was the problem. Please let us know wether you receive the message or not.

Thanks in advance.

Firewall protection/security scan software problem

Posted: Wed Jul 19, 2006 1:27 pm
by 9346303
Narcis,
It appears from the header of the email that the security software is removing all attachments and marking your email as spam. So even though I set my level to do not mark as spam. It looks like a IT department problem of which I am not able to go around. I could download it from an ftp site or setup a new beta for testing?

Please advise me on how to proceed.

Thanks again for the help.

Posted: Wed Jul 19, 2006 1:38 pm
by narcis
Hi scottpj,

Please try downloading the demo from http://www.steema.com/files/private/Builder2006.zip . Please let me know when it's done as I will remove the file from the website.

Thanks, downloaded and will test

Posted: Wed Jul 19, 2006 1:44 pm
by 9346303
Narcis,
I have downloaded the file.

Thanks again for all the time and support.
Have a great day. I will compile and test the code.

Posted: Wed Jul 19, 2006 1:47 pm
by narcis
Hi scottpj,

Excellent, you're very welcome!

Thanks and have a nice day too.

Compiled and found same errors.

Posted: Wed Jul 19, 2006 2:49 pm
by 9346303
1. Extracted the code to C:\CPP
Extracted to Builder2006 directory.
2. Ran Borland Developer Studio 2006 and open project file in C:\CPP\Builder2006
Window popup with Title => Find Static Library
Unable to find static library: Tee710.lib
3. Set to: C:\Program Files\Steema Software\TeeChart 7.08 for Delphi 2006\Delphi10\Lib\Obj\Tee710.lib

4. 26 Errors (the maximum number of errors?)
[C++ Error] Teegeometry.hpp(263): E2091 Functions cannot return arrays or functions
Full parser context
OpenGL_Editor.cpp(6): #include C:\CPP\Builder2006\OpenGL_Editor.h
OpenGL_Editor.h(17): #include C:\Program Files\Steema Software\TeeChart 7.08 for Delphi 2006\Delphi10\Include\TeeOpenGL.hpp
TeeOpenGL.hpp(23): #include C:\Program Files\Steema Software\TeeChart 7.08 for Delphi 2006\Delphi10\Include\Teeglcanvas.hpp
Teeglcanvas.hpp(23): #include C:\Program Files\Steema Software\TeeChart 7.08 for Delphi 2006\Delphi10\Include\Opengl2.hpp
Opengl2.hpp(18): #include C:\Program Files\Steema Software\TeeChart 7.08 for Delphi 2006\Delphi10\Include\Teegeometry.hpp
Teegeometry.hpp(22): namespace Teegeometry

Which is:
extern PACKAGE TAffineDblVector __fastcall MakeAffineDblVector(double const * V, const int V_Size);
C:\Program Files\Steema Software\TeeChart Pro 7.07 Full Source
Code\Sources\Compiled\Delphi10\Include\TeeGeometry.hpp(124):
typedef double TAffineDblVector[3];

Since this is an array, this return value is not acceptable to C++.

A possible solution is to change the code to :
struct
{
double *P;
double T[3];
}AffineDbVector;

At constructior time, the following assignment will have to be made.
AffineDbVector.P = &AffineDbVector.T[0];
Now the compiler can be used to resolve the size of AffineDbVector.T using

sizeof(AffineDbVector.T)

and the number of elements by using

sizeof(AffineDbVector.T)/sizeof(AffineDbVector.T[0])

In the above I am assuming that the pointer and data need to be kept associated to each other. A structure will enforce this association.
The problem is how the code will have to change to support this idea.

Or

Just change all the TAffineDbVector references to PAffineDbVector and resolve it in the implementation of each variable. Since sizeof(TAffineDbVector) / sizeof(TAffineDbVector[0]) will also return the number of elements in the array, the compiler can be used to correct any lost information.

This is the same error that I got previously. What compiler switches are being used? Since we are using the same code, it must be how the compiler is setup.

Please advise on how you will resolve/help me to fix this problem.

Posted: Fri Jul 28, 2006 8:06 am
by narcis
Hi scottpj,

We could reproduce the issues you commented. We need to review it deeply. We will get back to you when we have some news.

Thanks for your patience.

E2091 Functions cannot return arrays or functions

Posted: Wed Aug 23, 2006 12:53 pm
by 9338658
Hi,

Can you give me an indication as to when the patch for this error will be available. Yesterday being better than today ;)

Greetings,
Auke Nauta

Posted: Tue Aug 29, 2006 9:40 am
by Pep
Hi anauta,

we're reviewing the code in order to fix the problem for the next maintenance release, in meantime commenting some lines of code the Demo can be executed. If you want let me know an email accound and I can send to you the .hpp files with commented lines to make it work.

Posted: Tue Aug 29, 2006 11:21 am
by 9338658
OK, Here's my e-mail:

[email protected]

Thanks for the support.
Greetings,
Auke