Skip to main content

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

The CHECKFIL routine is located in the externl.obj module or in the UTILS.LBR module.
Normally if you have an application where an .EXE calls a .DLL then you would link the externl.obj to your .EXE and then CHECKFIL would be available to all of the .DLLs that were called from this .EXE. It sounds as if you are doing this because it works when you call the .DLL from the .EXE.

If your .DLL is being called by another .DLL then one of these .DLLs would have to have externl.obj linked to it unless the main .EXE which is calling the first .DLL already has externl.obj linked to it, in which case it should work just like the first example where the .EXE calls the .DLL directly.

For any of this to work you should be linking the .EXE and all .DLLs using dynamic linking and not static linking. If you are linking the .DLLs as static then it would have its own copy of the run-time files already linked in and would not see the CHECKFIL in the main .EXE.

How are you building your application? What cbllink options are you using? Are you building from within the IDE or from a makefile?

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

Thank you for your help. We are building from makefiles. The externl.obj is being linked to the exe, and I noticed that some of the .mak files reference the externl.obj and others don't. I was trying not to modify the environment more than necessary, because it was working properly for quite a while. Would the externl.obj need to be linked into any dll that is being called?

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

Thank you for your help. We are building from makefiles. The externl.obj is being linked to the exe, and I noticed that some of the .mak files reference the externl.obj and others don't. I was trying not to modify the environment more than necessary, because it was working properly for quite a while. Would the externl.obj need to be linked into any dll that is being called?

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

externl.obj would not need to be linked into the .DLLs as long as it is linked into the main .EXE in the chain. The exception would be if the .DLL were being linked with the static option instead of dynamic.

dynamic linking would be used if you were using
cbllink -r[option]
static would be
cbllink -b[option]

Can you make out what you final cbllink command would be in the makefile and what options are being used?

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

I don't see a reference to cblink - the link statement executes link.exe with parms: filename.obe filename.obj /out:filename.dll /NOD /DLL

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

Using cbllink significantly simplifies the process as it automatically links in required modules depending on command line options being used.

If you are using LINK directly then you need to explicitly include any .objs and .libs that may be required by your programs.

For instance, if you are using shared, dynamic linking then you need to include the glue run-time library cblrtsg.lib in your link so that it will load the run-time support modules dynamically at run-time.

If you are statically linking then you would link to cblrtss.lib.

In your case when using a main .EXE and a called .DLL you should be linking to cblrtsg.lib.

Do you see anywhere that this is being referenced?

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

The libs being referenced are CBLRTSSI.LIB DB2API.LIB and MSVCRT.LIB

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

cblrtssi.lib is the Shared run-time import library which should be fine as long as all programs are linked using this module.

I can reproduce the 173 error on CHECKFIL if I have a main program .EXE that calls a .DLL and they are both using the OUTDD directive when compiled.

The error occurs when I call the .DLL if I do not link in the object modules outddfh.obj and externl.obj into the main .EXE. If I link these in then I do not get the error. If I link these into both the .EXE and .DLL then I get a RTS error 119 duplicate symbols.

So it seems to me that when you call the .DLL through the .EXE that the EXE is linked correctly.

When you say that it fails when you call the .DLL from another .DLL can you elaborate on what you mean? Is this first .DLL started from the same .EXE where it works?

I noticed that one of our engineers has a support incident open for this problem with you. If we can not resolve this quickly on the Community Site then I would recommend that you resume working it thru the support incident so that we can get traces, etc. if we require them.

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

Your insight has been most helpful toward resolving this error. I believe we are on the right track now for sure. I am the person who opened that ticket, and we have done traces and looked at them, but you are the first person to get me toward what appears to be a solution. We are including the OUTDDFH and EXTERNL objs in the exe and the "driver" dll that is called by that exe. some of the other downstream dlls also have both.

The .exe program has calls to several DLLs, but it's primary purpose is to call the "driver" dll that subsequently calls other DLLs, and those DLLs may also call DLLs, until at some point the process comes back up to that driver DLL and the process completes and returns to the .exe. There can be 50 or more DLLs that execute within the process, and some of those are called multiple times.

It is fixing my process to had the externl.obj to each of the downstream dlls as each will trigger the 173 until I do. From what you've said however, it seems that changing the build at the top of the process may be a better solution.

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

Your insight has been most helpful toward resolving this error. I believe we are on the right track now for sure. I am the person who opened that ticket, and we have done traces and looked at them, but you are the first person to get me toward what appears to be a solution. We are including the OUTDDFH and EXTERNL objs in the exe and the "driver" dll that is called by that exe. some of the other downstream dlls also have both.

The .exe program has calls to several DLLs, but it's primary purpose is to call the "driver" dll that subsequently calls other DLLs, and those DLLs may also call DLLs, until at some point the process comes back up to that driver DLL and the process completes and returns to the .exe. There can be 50 or more DLLs that execute within the process, and some of those are called multiple times.

It is fixing my process to had the externl.obj to each of the downstream dlls as each will trigger the 173 until I do. From what you've said however, it seems that changing the build at the top of the process may be a better solution.

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

Linking externl.obj to each .DLL makes no sense to me if you are linking it into the main executable. The main .EXE and all the .DLLs that are called within the run-unit are part of the same process. If you make the CHECKFIL entry point available in the main .EXE then it will be available to all other .DLLs.

The only way that I can see that it would be necessary to link externl.obj into your .DLLs is if you are linking the main .EXE as static in which case its CHECKFIL would not be available to the .DLLs that were called and linked as shared.

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

I'll try to remove it from all link statements, other than that .exe link and see if it works, but I believe that was failing on the first .dll called.

During execution of the process, using Net Express we are getting a "file not found" error.  It occurs when calling a DLL from a DLL.  Calling the same DLL from an EXE is working fine.  While this code has worked fine for years, I had to rebuild the process, and this error is the result.  I'm questioning the way the DLL is being called.  Has anyone had experience with this that might help?

If you link externl.obj into the first .EXE and you get an error when calling the .DLL then one of them is being linked as static. Make sure that everything is linked to the same start module cblrtssi.lib.