1. Error running bound exe
- Posted by cp Oct 02, 2009
- 1494 views
My exe runs fine on one machine, however when I copy it to another machine and run it I get an error msg like this: Myapp.exw:1 c_proc/c_func: bad routine number (-1)
help pointing me to why it fails on one machine but not another is much appreciated.
2. Re: Error running bound exe
- Posted by CoJaBo Oct 02, 2009
- 1375 views
Most likely you are missing a DLL the code is trying to open.
3. Re: Error running bound exe
- Posted by mattlewis (admin) Oct 02, 2009
- 1376 views
My exe runs fine on one machine, however when I copy it to another machine and run it I get an error msg like this: Myapp.exw:1 c_proc/c_func: bad routine number (-1)
help pointing me to why it fails on one machine but not another is much appreciated.
We need a little more information. This error says that it couldn't load some function from a dll.
- Are you using any custom dlls (i.e., not provided by the operating system)? If so, are they where the exe expects them to be (probably in the same directory)?
- Do both machines run the same operating system? Your application could be using something introduced in a particular version of Windows, but now you're running on an earlier version.
I suspect that the answer is number 1, but most likely one of these is the issue.
Matt
4. Re: Error running bound exe
- Posted by cp Oct 02, 2009
- 1347 views
Yes I have include files that wrap a custom DLL but the DLL is registered and exists on both machines in the same location.
both machines are running windows XP
one thing that is strange that I thought was the cause of the issue is that one of my include files was located in the same dir as my exw source but not in my euphoria\include dir. I did the bind without error and the exe ran fine on that machine.
5. Re: Error running bound exe
- Posted by jimcbrown (admin) Oct 02, 2009
- 1371 views
Yes I have include files that wrap a custom DLL but the DLL is registered and exists on both machines in the same location.
both machines are running windows XP
What about that custom DLL's dependencies? It may require another dll that exists on the one machine but which is missing on the other.
one thing that is strange that I thought was the cause of the issue is that one of my include files was located in the same dir as my exw source but not in my euphoria\include dir. I did the bind without error and the exe ran fine on that machine.
Binding merges all the include files into the .exe, so having extra copies lying around won't affect things.
6. Re: Error running bound exe
- Posted by mattlewis (admin) Oct 02, 2009
- 1410 views
Yes I have include files that wrap a custom DLL but the DLL is registered and exists on both machines in the same location.
both machines are running windows XP
one thing that is strange that I thought was the cause of the issue is that one of my include files was located in the same dir as my exw source but not in my euphoria\include dir. I did the bind without error and the exe ran fine on that machine.
I doubt it is an include file. You say that the dll was in the same location. This may not be enough. Here is how Windows searches for dlls:
- The directory where the executable module for the current process is located.
- The current directory.
- The Windows system directory. The GetSystemDirectory function retrieves the path of this directory.
- The Windows directory. The GetWindowsDirectory function retrieves the path of this directory.
- The directories listed in the PATH environment variable.
Does your dll fit into this on the second machine?
Matt
7. Re: Error running bound exe
- Posted by mattlewis (admin) Oct 02, 2009
- 1392 views
What about that custom DLL's dependencies? It may require another dll that exists on the one machine but which is missing on the other.
That's a good point. Dependency Walker is a great tool for debugging dependencies.
Matt
8. Re: Error running bound exe
- Posted by useless Oct 02, 2009
- 1410 views
Yes I have include files that wrap a custom DLL but the DLL is registered and exists on both machines in the same location.
both machines are running windows XP
What about that custom DLL's dependencies? It may require another dll that exists on the one machine but which is missing on the other.
Or even the same version of the dll. Different versions can have different exported names. I tend to keep everything needed for a project in the same dir.
useless