Re: [Firebird-devel] gpre deprecated and sample code

2017-07-05 Thread U-BLASTER-6000\mtdew

Hi -

I missed some things in communication because of the way I am set up to
receive information.

I didn't set up all the folders I needed to in mu/mu4e. There are labels
in gmail like 'forums' that I don't see in my non web based gmail client. The
information going to gmail and at the firebird-devel lists were not the
same. I better take the time to set up some new folders for imap so my
mail client will see everything.

I ended up having a disjointed converation because of this.

I appreciate all the assistance with gpre. I am not going to use it
though now that I find it is deprecated.

I apologize to the list for not taking better care of the lists and
email. I will try to fix that maybe tonight when I get home.

I am going to look over the examples and see if I can figure out where I
went wrong.

thx. very much.
sorry :-(

Have a cool day.
jim

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] udrcpp_example

2017-07-05 Thread Adriano dos Santos Fernandes
On 04/07/2017 11:33, Paul Reeves wrote:
> Building udrcpp_example fails under windows, and has done since at
> least the final release of Firebird 3.0. Unfortunately the build
> process doesn't detect the error. I shall commit a fix for that in a
> moment.
>
> Here is the error (repeated many times) :
>
> error C2896: 'bool
> Firebird::Udr::FactoryRegistration::run(Firebird::CheckStatusWrapper
> *,Firebird::IUdrPlugin *,void (__thiscall Firebird::IUdrPlugin::*
> )(Firebird::CheckStatusWrapper *,const char *,T
> *),Firebird::Udr::RegistrationNode *)' : cannot use function
> template 'void Firebird::IUdrPlugin::registerFunction(StatusType
> *,const char *,Firebird::IUdrFunctionFactory *)' as a function argument
>
>
Paul, please tests these patches (separately) and report the results
(including line numbers if has errors).


Adriano

diff --git a/src/include/firebird/UdrCppEngine.h 
b/src/include/firebird/UdrCppEngine.h
index ce949bd..26ef5a0 100644
--- a/src/include/firebird/UdrCppEngine.h
+++ b/src/include/firebird/UdrCppEngine.h
@@ -330,13 +330,13 @@ public:
{
CheckStatusWrapper statusWrapper(status);
 
-   if (!run(, plugin, ::registerFunction, 
regFunctions))
+   if (!run(, plugin, 
::registerFunction, regFunctions))
return;
 
-   if (!run(, plugin, 
::registerProcedure, regProcedures))
+   if (!run(, plugin, 
::registerProcedure, regProcedures))
return;
 
-   if (!run(, plugin, ::registerTrigger, 
regTriggers))
+   if (!run(, plugin, 
::registerTrigger, regTriggers))
return;
}
 
diff --git a/src/include/firebird/UdrCppEngine.h 
b/src/include/firebird/UdrCppEngine.h
index ce949bd..118e63d 100644
--- a/src/include/firebird/UdrCppEngine.h
+++ b/src/include/firebird/UdrCppEngine.h
@@ -330,13 +330,22 @@ public:
{
CheckStatusWrapper statusWrapper(status);
 
-   if (!run(, plugin, ::registerFunction, 
regFunctions))
+   void (IUdrPlugin::*regFunction)(CheckStatusWrapper*, const 
char*, IUdrFunctionFactory*) =
+   ::registerFunction;
+
+   void (IUdrPlugin::*regProcedure)(CheckStatusWrapper*, const 
char*, IUdrProcedureFactory*) =
+   ::registerProcedure;
+
+   void (IUdrPlugin::*regTrigger)(CheckStatusWrapper*, const 
char*, IUdrTriggerFactory*) =
+   ::registerTrigger;
+
+   if (!run(, plugin, regFunction, regFunctions))
return;
 
-   if (!run(, plugin, 
::registerProcedure, regProcedures))
+   if (!run(, plugin, regProcedure, regProcedures))
return;
 
-   if (!run(, plugin, ::registerTrigger, 
regTriggers))
+   if (!run(, plugin, regTrigger, regTriggers))
return;
}
 
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] hello world of gpre requested

2017-07-05 Thread U-BLASTER-6000\mtdew


Hi-

If it is close to being deprecated then I won't spend another minute on
it. I didn't know that. I have IBPP up and running so I willl stick with
that then for now. No more GPRE. GNU cobol has other options.


Have a cool hump day (wed.)

thx. for the answer,
jim

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] hello world example of gpre requested

2017-07-05 Thread Leyne, Sean


> With Cobol things are worse. I do not know any sample, what is worse -
> noone of FB developers ever used to write a single line using that language.
> And if I'm not mistaken gpre distributed in binaries does not support cobol.

Actually, Steve Boyd provided patches for Cobol support some time back.

Perhaps he has examples that can the provided.


> Also I have to warn you that gpre is close to getting 'de[recated'
> status soon i.e. it's not recommended to start new projects using it.

I completely agree that gpre needs to become g-gone.


Sean


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] hello world example of gpre requested

2017-07-05 Thread Paul Beach

<>

I have some cobol samples - on paper.
I have used gpre fairly extensively over the years, but you are right
in terms of deprecation, it doesn't support new features and its very
long in the tooth. Adding cobol support to Firebird by doing a build
isn't complicated, a simple

./configure –with-gpre-cobol
make

Should do the trick.

Regards
Paul


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] hello world example of gpre requested

2017-07-05 Thread Alex via Firebird-devel



On 05.07.2017 02:59, U-BLASTER-6000\mtdew wrote:

Hi-

I looked everywhere for docs on using gpre. I am interested in either a
c, c++, or cobol example for gpre compiled with gcc,g++, or cobc for
gnucobol. Can anyone include a link or file with some pointers?
e.g. c file with embedded sql and then the gcc commands to make it work.
I am using 2.5.x series cobol versions. I think after the gpre line
there is only one or two lines of gcc compiler commands to make it work.
c would probably be the easiest because when you run gpre with cobol it
is a little bit of work to get the output formatted the right way for
instance to feed it to cobc for gnucobol. I tried paul's article on
cobol but got really stuck, so I think C or C++ might be better.

Thanks for any links or a very brief tutorial if you can provide them.


What about C - you can find some samples in examples/stat of firebird 
distro (not absolutely sure for windows binaries, if it's missing there 
- please use src tarbal, linux binaries or github directly).


With Cobol things are worse. I do not know any sample, what is worse - 
noone of FB developers ever used to write a single line using that 
language. And if I'm not mistaken gpre distributed in binaries does not 
support cobol.


Also I have to warn you that gpre is close to getting 'de[recated' 
status soon i.e. it's not recommended to start new projects using it.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel