Help wanted on APT && C++

Help wanted on APT && C++

Post by D.V.S.Ra » Fri, 03 Dec 1993 12:08:24



I was trying to compile the aptlib file using C++ compiler. It was giving the following
errors. I tried using extern "C", but it doesnot seem to work.

Thanks

Raju

***********************************************************************************
"a.cc", line 24: warning: old style definition of main() (anachronism)
"a.cc", line 38: error:  undefined function fsinit called
"a.cc", line 45: error: unexpected  1 argument for fsopenscreen()
"a.cc", line 47: error: unexpected  1 argument for fsdblogin()
"a.cc", line 52: error: unexpected  1 argument for fsdbrec()
"a.cc", line 53: error: unexpected  1 argument for fsdbenviron()
"a.cc", line 68: error: unexpected  1 argument for fsgetform()
"a.cc", line 71: error: unexpected  1 argument for dbclose()
"a.cc", line 72: error: unexpected  1 argument for fsabort()
"a.cc", line 76: error: unexpected  1 argument for fsinstallproc()
"a.cc", line 78: error: unexpected  1 argument for fsprocargs()
"a.cc", line 82: error: unexpected  1 argument for fscallform()
"a.cc", line 84: error: unexpected  1 argument for dbclose()
"a.cc", line 86: error:  undefined function fsexit called
"a.cc", line 96: error:  argument declaration syntax
***************************************************************************

 
 
 

Help wanted on APT && C++

Post by Anita Trotte » Fri, 03 Dec 1993 22:45:04



Quote:>I was trying to compile the aptlib file using C++ compiler. It was giving the following errors. I tried using extern "C", but it doesnot seem to work.

>***********************************************************************************
>"a.cc", line 24: warning: old style definition of main() (anachronism)
>"a.cc", line 38: error:  undefined function fsinit called
>"a.cc", line 45: error: unexpected  1 argument for fsopenscreen()
>"a.cc", line 47: error: unexpected  1 argument for fsdblogin()
>"a.cc", line 52: error: unexpected  1 argument for fsdbrec()
>"a.cc", line 53: error: unexpected  1 argument for fsdbenviron()
>"a.cc", line 68: error: unexpected  1 argument for fsgetform()
>"a.cc", line 71: error: unexpected  1 argument for dbclose()
>"a.cc", line 72: error: unexpected  1 argument for fsabort()
>"a.cc", line 76: error: unexpected  1 argument for fsinstallproc()
>"a.cc", line 78: error: unexpected  1 argument for fsprocargs()
>"a.cc", line 82: error: unexpected  1 argument for fscallform()
>"a.cc", line 84: error: unexpected  1 argument for dbclose()
>"a.cc", line 86: error:  undefined function fsexit called
>"a.cc", line 96: error:  argument declaration syntax
>***************************************************************************

Yes -- I had these problems too and they were really irritating. Don't tell my
Unix and Sybase technical support but I altered the "sybfrs.h" in my
/usr/local/sybase directory (we use Unix).

This header file declares its dblib procedures, like the ones you've called
above, like:

        extern RETCODE           fscallform();

I think you can get away with this type of loose C procedure declarations in C
but not with C++. You need that procedure declaration to look like:

        extern RETCODE           fscallform( FORM * );

so that your C++ knows that a variable of type FORM * is going to be passed.

Here are some more of the proc declarations you'll need:

Quote:> for fsopenscreen(int *, char *[], char *)
> for fsdbrec(LOGINREC *)
> for fsdbenviron(DBPROCESS *)
> for fsgetform(char *, char *)
> for fsabort(char *)
> for fsinstallproc(FSPROCEDURE [])
> for fsprocargs(char *, POINTER * )
> for fscallform(FORM *)

I know this list isn't complete for your needs. I just found what was supposed to
be in these declarations from the
        "Sybase APT-Library/C Reference Manual"
so you can look up the rest. Good Luck!

=========================================================================

        Fannie Mae                             Phone : (202) 752-4576
     4000 Wisconsin Ave NW
     Washington, DC 20016                    

Note: the opinions above are my own and don't necessarily reflect those
      of my employer.
=========================================================================

 
 
 

Help wanted on APT && C++

Post by Joel Friedm » Sat, 04 Dec 1993 00:20:01




->>I was trying to compile the aptlib file using C++ compiler. It was giving the following errors. I tried using extern "C", but it doesnot seem to work.
->>
->>***********************************************************************************
->>"a.cc", line 24: warning: old style definition of main() (anachronism)
->>"a.cc", line 38: error:  undefined function fsinit called
->>"a.cc", line 45: error: unexpected  1 argument for fsopenscreen()
->>"a.cc", line 47: error: unexpected  1 argument for fsdblogin()
->>"a.cc", line 52: error: unexpected  1 argument for fsdbrec()
->>"a.cc", line 53: error: unexpected  1 argument for fsdbenviron()
->>"a.cc", line 68: error: unexpected  1 argument for fsgetform()
->>"a.cc", line 71: error: unexpected  1 argument for dbclose()
->>"a.cc", line 72: error: unexpected  1 argument for fsabort()
->>"a.cc", line 76: error: unexpected  1 argument for fsinstallproc()
->>"a.cc", line 78: error: unexpected  1 argument for fsprocargs()
->>"a.cc", line 82: error: unexpected  1 argument for fscallform()
->>"a.cc", line 84: error: unexpected  1 argument for dbclose()
->>"a.cc", line 86: error:  undefined function fsexit called
->>"a.cc", line 96: error:  argument declaration syntax
->>***************************************************************************
->
->Yes -- I had these problems too and they were really irritating. Don't tell my
->Unix and Sybase technical support but I altered the "sybfrs.h" in my
->/usr/local/sybase directory (we use Unix).
->
->This header file declares its dblib procedures, like the ones you've called
->above, like:
->
->   extern RETCODE           fscallform();
->
->I think you can get away with this type of loose C procedure declarations in C
->but not with C++. You need that procedure declaration to look like:
->
->   extern RETCODE           fscallform( FORM * );
->
->so that your C++ knows that a variable of type FORM * is going to be passed.
->
->Here are some more of the proc declarations you'll need:
->
->> for fsopenscreen(int *, char *[], char *)
->> for fsdbrec(LOGINREC *)
->> for fsdbenviron(DBPROCESS *)
->> for fsgetform(char *, char *)
->> for fsabort(char *)
->> for fsinstallproc(FSPROCEDURE [])
->> for fsprocargs(char *, POINTER * )
->> for fscallform(FORM *)
->
->I know this list isn't complete for your needs. I just found what was supposed to
->be in these declarations from the
->   "Sybase APT-Library/C Reference Manual"
->so you can look up the rest. Good Luck!
->
->=========================================================================

->
->        Fannie Mae                             Phone : (202) 752-4576
->     4000 Wisconsin Ave NW
->     Washington, DC 20016                    
->
->Note: the opinions above are my own and don't necessarily reflect those
->      of my employer.
->=========================================================================
->
->

There is a simpler way, just wrap the .h in an extern "C" {}
construct. Now you don't have to worry about having to make all
of those changes again when the next version of Sybase comes in.

---
====================================================================
                            |
       _/ _/_/_/ _/_/_/ _/  | Joel Friedman (consultant)
      _/ _/  _/ _/     _/   |
     _/ _/  _/ _/_/   _/    | - "If you've got a solution, let me
 _/ _/ _/  _/ _/     _/     |    find the problem."
 _/_/ _/_/_/ _/_/_/ _/_/_/  |
                            | W: (202) 752-2210
====================================================================

 
 
 

Help wanted on APT && C++

Post by alexander gin » Sat, 04 Dec 1993 01:02:19


Hello,

I'm looking for information on how to design security systems for Sybase
client/server apps written in PowerBuilder 3.0 and C++. I've looked at the
Sybase manuals and quite a few Sybase/client/server books, but none of them
seems to go beyond basic stuff about grant & revoke and how the permission
hierarchy is set up. What I really need is info. on different design
approaches, like: view based security vs. table security, pros & cons. I'm
particularly concerned about making a system that is easily upgradable and
maintainable.

If people will e-mail me any relevant info. or tell me where to find it, I
will be happy to post a summary, since I have a feeling I'm not the only one
in the dark on this subject. I'm looking for books, magazine articles, white
papers, etc.


Thanks in advance!

                                             --Alex
--
-------------------------------------------------------------------------------
                           Alexander Z. Ginos
                  "Type softly and carry a big magnet..."

 
 
 

1. Record&play functionality with apt&dwb

The following command line options (undocumented) are available
for apt & dwb.

apt.std -record <filename> [-menu]

apt.std -play <filename>

With this functionality you can record&play key files.
I want to use this for automatic test functions and i am
already using it to dump&load reports.

The menu you get when you use the -menu option must be
available when you are recording a key file but i don't
know which key to press.
I think there are more menus. (Get strings from the libs
and you will see)

Can anybody tell me which keys i should press ?
I would also like to know which commands can be used in
the key file. (Like delay or something to slow down the
processing of the key file).

Thanks!
Taco Henstra

2. Compacting password-protected db

3. Need HELP fast device files )(*&)(*&&^%^

4. help !!! newbie question

5. .&.&.& need help about an SQL query &&&

6. Jump to selected record

7. #&%*$&*EDbEngineError#&%*$&*

8. Do you want money!!

9. &#22914;&#20309;&#24674;&#24489;&#25976;&#25818;&#24235;

10. Command Line vs DWB & APT

11. Sybase 4.9.2 & APT Workbench

12. APT-SQL connect & SQL Server

13. APT & List of Values