Any ideas?
Earl Hodil
I knew this would happen! That's why I didn't put code up there initially. I work for a software vendor so I can't post any of our code on a message board. I just cobbled up something quick and dirty. Suffice it to say, the real code has the right syntax. The problem is, the compiler doesn't want me to have parameters on an external function! Does anybody know why?
92 extern "OS" short int dsntiar(struct sqlca *,
93 struct error_struct *,
94 int *);
000004 //CPP EXEC CPP,PARM='/CXX '
000005 //C.SYSIN DD *
000006 #include <string.h>
000007 extern "OS" int myfun1(int a, int b)
000008 {
000009 return a + b ;
000010 }
000011 extern "OS" int myfun2(char *a,char *b)
000012 {
000013 return strlen(a) + strlen(b) ;
000014 }
000015 //CPP EXEC CPP
000016 //C.SYSIN DD *
000017 #include <string.h>
000018 #pragma linkage(myfun1,OS)
000019 #pragma linkage(myfun2,OS)
000020 extern int myfun1(int a, int b)
000021 {
000022 return a + b ;
000023 }
000024 extern int myfun2(char *a,char *b)
000025 {
000026 return strlen(a) + strlen(b) ;
000027 }
I knew this would happen! That's why I didn't put code up there initially .... I just cobbled up something quick and dirty. Suffice it to say, the real code has the right syntax. The problem is, the compiler doesn't want me to have parameters on an external function! ...