On Thu, 4 Jul 2019 at 15:29, Joseph Reichman <[email protected]> wrote:

> Last question I got a clean compile, prelink, link from a C program I tried
> to compile in samplib, however I looking  at the prelink output It gave me
> unresolved extern for C runtime library sprint etc

Why are you using the prelinker? Just use the Binder. I don't believe
there is anything the prelinker can do that the Binder can't. And it
certainly complicates the process. I also don't know if the prelinker
supports DLLs...

Regardless, how are you running your compile? JCL or xlc or...?

> Does that library go to the syslib, prelink or linker and would probably bee
> some CEE.. library

Probably you need SYSLIB pointing at (at least) CEE.SCEECPP,
CEE.SCEELKEX. That's for JCL; you can also use the SEARCH/LSEARCH
compiler options to point to them.

> While Visual Studio when creating C DLL project generated a DLLMain and
> PROCESS_DETCH/ATTACH THREAD_DETACH/ATTACH I don't need any of that with z/os

Did you look at the "big picture" presentation that Jon Perryman
posted a couple of days ago?
ftp://ftp.software.ibm.com/s390/zos/le/an8130.pdf  It's dated, but
still a useful overview of the process.

> Says I should use the CEEPCALL macro

Yup.

> Just wondering if I have t have a CEEENTRY macro for the CSECT from which I
> would like to call the exported functions from

Yup.

> Any special debugging advice I guess the compiler CCNDRVR generates the
> assembler code I could always debug it with TEST

TEST doesn't understand a whole bunch of things about the DLL and LE
environments. But it may work for the basic stuff.

Might be time to look at debugging with dbx...

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to