[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference microw::acmsxp

Title:ACMSxp product questions and comments
Notice:Refer to notes 1 through 11 for conference information
Moderator:DUCAT::ROSCOE
Created:Tue Oct 05 1993
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:282
Total number of notes:1134

246.0. "can't compile task group for VB" by OSTV03::K_HORIE () Sat Jan 25 1997 05:45

Hello,

I am trying ACMSxp 3.0 on Windows NT 4.0 and on VMS.

I can not compile a task group definition with a -V flag (for Visual Basic).
The task group includes a composable task.  The error message is as follows.
Some parts of original the error message is Japanease, so I have translated it.


  hello_task_group_vb.def : error LNK2001: external symbol "kanoubi_kensaku_sub"
  is not resolved.
  hello_task_group_vb.lib : fatal error LNK1120: external symbol 1 is not
  resolved.
  LINK : fatal error LNK1141: an error occured during building export file.
  %STDL-F-CDRSYSCERR Error invoking C compiler


"kanoubi_kensaku_sub" is composable task name.

The same task group definition can be compiled without -V flag.


Thanks for any comments.

Kouji Horie
T.RTitleUserPersonal
Name
DateLines
246.1COMPOSABLE tasks not supported for VB clientMICROW::RAMSEYMon Jan 27 1997 12:0416
Kouji,

This is not supported.

Appendix B of the ACMSxp for WindowsNT Getting Started Guide contains
information about building Visual Basic clients. In section B.4.1
it states:

The task group specification used to build the client cannot contain
any task definitions with the COMPOSABLE attribute. If the task group
specification does contain composable tasks, unresolved references
occur when the client is linked.


diane
246.2TKOV60::OKAMURAH.Okamura PS4-2/EJD3/NSIS, JapanTue Apr 01 1997 04:5312
Diane-san,

>This is not supported.

Will this restriction be solved feature release? If you will not, could you
show me the reason?

This restriction obstacles to reuse the same task group definition as server
side.

Thanks,
Hiroaki
246.3TKOV60::OKAMURAH.Okamura PS4-2/EJD3/NSIS, JapanWed Apr 16 1997 06:5782
>Will this restriction be solved feature release? If you will not, could you
>show me the reason?

From the technical point of view, it is not so difficult to distinguish the
composable or non-composable task.

I'll attach the sample code to make module definition (.DEF) file for VB.

Hiroaki

void do_mcl_vb_def ( cfe_t_symbol *grpp ) /* Task Group Symtab */
{
  cfe_t_symbol       *funp, *argp ;
  int                argnum ;
  wchar_t            taskgrpname[255], utaskgrpname[255], taskname[MCL_TASKNAME_MAX + 1] ;
  cbe_t_emit_handle  *deffile ;

  /* Check generate_type */
  if ( (cdr_g_options->generate_type != CDR_VB_EXPLICIT &&
       cdr_g_options->generate_type != CDR_VB_IMPLICIT) ) return ; /* Nothing to do. Return!! */

  /*  Generate Module Definition File for upper stub for Visual Basic */
  if ( grpp->symbol_type == SYMTAB_TASKGROUP ) 
  {
      /*  Trancate task group name less than FILENAM_MAX  */
      towupps(utaskgrpname, grpp->code_gen_name);
      towlows(taskgrpname, grpp->code_gen_name);
      if (wcslen(taskgrpname) >= FILENAM_MAX)
          *(taskgrpname + FILENAM_MAX) = '\0';
      if (wcslen(utaskgrpname) >= FILENAM_MAX)
          *(utaskgrpname + FILENAM_MAX) = '\0';
      sprintf(outfilepath,"%S.def", taskgrpname);

      /*+
       *  Create Module Definition File
      -*/
      deffile = cbe_emit_open(outfilepath, TPSTUB_FILE, NULL);

      /* 'LIBRARY' Section */
      sprintf ( defbuf, "LIBRARY      %S", utaskgrpname);
      cbe_emit ( deffile, CBE_NL, defbuf, 0, (char *)NULL ) ;
      /* 'DESCRIPTION' Section " */
      if (cdr_g_options->generate_type == CDR_VB_EXPLICIT)
          sprintf ( defbuf, "DESCRIPTION  '.DEF Template for Upper Stub of %S (EXPLICIT Binding)'", taskgrpname);
      else
          sprintf ( defbuf, "DESCRIPTION  '.DEF Template for Upper Stub of %S (IMPLICIT Binding)'", taskgrpname);
      cbe_emit ( deffile, CBE_NL, defbuf, 0, (char *)NULL ) ;
      /* 'CODE' Section */
      cbe_emit ( deffile, CBE_NL, "CODE         PRELOAD MOVEABLE DISCARDABLE", 0, (char *)NULL);
      /* 'DATA' Section */
      cbe_emit ( deffile, CBE_NL, "DATA         PRELOAD MOVEABLE SINGLE", 0, (char *)NULL);
      /* 'HEAPSIZE' Section */
      cbe_emit ( deffile, CBE_NL, "HEAPSIZE     32767", 0, (char *)NULL);
      /* 'EXPORTS' Section */
      cbe_emit ( deffile, CBE_NL, "EXPORTS", 0, (char *)NULL);

      /*  Main loop for current task group  */
      for ( funp = grpp->child ; funp != NULL ; funp = funp->sibling ) {
          if ( funp->u.t_int.composable == FALSE ) {
              /*  Count up number of arguments  */
              argnum = 0 ;
              for ( argp = funp->child ; argp != NULL ; argp = argp->sibling )
                  argnum ++ ;
              if (cdr_g_options->generate_type == CDR_VB_EXPLICIT)
                  argnum += 2; /* Add BindStr and EINFO */
              else
                  argnum += 1; /* Add EINFO */
              /*+
               *  Create contents of EXPORTS section.
              -*/
              towlows ( taskname, funp->code_gen_name ) ;
              sprintf ( defbuf, "             %S = _%S@%d", taskname, taskname, argnum * sizeof(void *) ) ;
              cbe_emit ( deffile, CBE_NL, defbuf, 0, (char *)NULL ) ;
          } /* End of if */
      } /* End of for */

      /*+
       *  Close Module Definition File
      -*/
      cbe_emit_close ( deffile ) ;
  } /* End of if */
}
246.4Problem being tracked internally as QAR 1011 - thanks for reporting this - RichDUCAT::ROSCOEThu Apr 17 1997 14:450