home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / dev / misc / data2object / example / c / main.c next >
Encoding:
C/C++ Source or Header  |  1994-02-20  |  733 b   |  36 lines

  1. /*****************************************************************************
  2. **
  3. ** make a text-object with d2o:
  4. **
  5. **      d2o Main.c SYMBOL Text OBJECT Text.o
  6. **
  7. ** compile your c-source to an object-file:
  8. **
  9. **      sc Main.c
  10. **
  11. **
  12. ** Now you've got the two object files:
  13. **
  14. **      Text.o
  15. **      Main.o
  16. **
  17. ** Make an executable file with for example SAS/C slink:
  18. **
  19. **      slink FROM lib:c.o main.o text.o TO Test
  20. **            LIB lib:sc.lib lib:amiga.lib
  21. **
  22. *****************************************************************************/
  23.  
  24. #include <stdio.h>
  25. #include <exec/types.h>
  26.  
  27. extern TEXT pText[];
  28. extern LONG lTextLen;
  29.  
  30. void main( void )
  31. {
  32.     printf("Length of text: %ld\n", lTextLen);
  33.     
  34.     printf("%s",pText);
  35. }
  36.