Home > Archive > Tcl > November 2006 > How to diagnose this error message?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to diagnose this error message?
|
|
| Kevin Walzer 2006-11-29, 7:08 pm |
| One of my applications is crashing on startup, and I'm not sure how to
diagnose the error.
Error in startup script: couldn't find procedure Growl_Init
while executing
"load
/Users/myname/Desktop/NameFind.app/Contents/MacOS/./../Frameworks/Tcl.framework/Versions/8.4/Resources/growl1.0/libgrowl.dylib"
("package ifneeded" script)
invoked from within
"package require growl"
(procedure "startUp" line 10)
invoked from within
"startUp" ...
The application is trying to load a Tcl binary extension,
libgrowl.dylib. "Growl_Init" is one of the procedures defined at the C
level.
What does it mean that it can't "find" the procedure? Does that mean
it's not seeing the dylib, or not successfully loading it?
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
| |
| Helmut Giese 2006-11-29, 7:08 pm |
| >The application is trying to load a Tcl binary extension,
>libgrowl.dylib. "Growl_Init" is one of the procedures defined at the C
>level.
>
>What does it mean that it can't "find" the procedure? Does that mean
>it's not seeing the dylib, or not successfully loading it?
Hi Kevin,
I have no Mac experience whatsoever, but this would fail (probably
with the same error message in aall cases)
- if the libray itself could not be found
- if a dependent libray could not be found
- if it didn't contain a function Growl_Init
Be sure to exclude case 2 ASAP - else you might be in for a lot of
unnecessary head scratching.
HTH
Helmut Giese
| |
|
|
Kevin Walzer wrote:
> One of my applications is crashing on startup, and I'm not sure how to
> diagnose the error.
>
> Error in startup script: couldn't find procedure Growl_Init
> while executing
> "load
> /Users/myname/Desktop/NameFind.app/Contents/MacOS/./../Frameworks/Tcl.framework/Versions/8.4/Resources/growl1.0/libgrowl.dylib"
> ("package ifneeded" script)
> invoked from within
> "package require growl"
> (procedure "startUp" line 10)
> invoked from within
> "startUp" ...
>
>
> The application is trying to load a Tcl binary extension,
> libgrowl.dylib. "Growl_Init" is one of the procedures defined at the C
> level.
>
> What does it mean that it can't "find" the procedure? Does that mean
> it's not seeing the dylib, or not successfully loading it?
>
Just my guess, but it sounds like it is finding the library and the
Growl_Init is referenced in the library but is not actually defined -
i.e. the source code was not compiled into that library. This probably
means you need a supplementary library with Growl_Init's definition
inside or you need to rebuild the library and include the missing code.
On a Linux/UNIX box you can use a function like "nm" to see what is
actually contained in the library file and my guess is that Growl_Init
with show up with a capital U for "Undefined"; if that is the case,
then you could search other library files using "nm" and see if some
other file actually defines "Growl_Init". If you're on a recent Mac
then "nm" might be defined and accessible through a terminal... I think
I've typed on a Mac on two, maybe three, difference occasions my entire
life. :-)
-Kevin - "nice name"!!
| |
| Robert Heller 2006-11-29, 7:08 pm |
| At Wed, 29 Nov 2006 17:45:58 GMT hgiese@ratiosoft.com (Helmut Giese) wrote:
>
> Hi Kevin,
> I have no Mac experience whatsoever, but this would fail (probably
> with the same error message in aall cases)
> - if the libray itself could not be found
> - if a dependent libray could not be found
> - if it didn't contain a function Growl_Init
Note: if the library is C++ and is compiled by a C++ compiler, it is
really important to use an 'extern "C"' declaration for the Growl_Init
function. Tcl is written in *plain* C and expects a *plain C*
interface to the mumble_Init() function (everything else can be C++ if it
makes sense -- Tcl will only ever see raw addresses (via
Tcl_Create[Obj]Command()... function calls)). C++ compilers 'mangle'
function names to account for overloading.
> Be sure to exclude case 2 ASAP - else you might be in for a lot of
> unnecessary head scratching.
> HTH
> Helmut Giese
>
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
heller@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk
| |
| Ralf Fassel 2006-11-30, 8:01 am |
| * Kevin Walzer <kw@codebykevin.com>
| Error in startup script: couldn't find procedure Growl_Init
--<snip-snip>--
| The application is trying to load a Tcl binary extension,
| libgrowl.dylib. "Growl_Init" is one of the procedures defined at the
| C level.
As others have already mentioned, make sure 'Growl_Init' is C, not C++
or some other name-mangled variant.
| What does it mean that it can't "find" the procedure? Does that mean
| it's not seeing the dylib, or not successfully loading it?
I read the message that the library could be found and opened ok
(otherwie you would have got a no-such-file or permission-denied
error), but the symbol could not be found in the exported symbol
table.
Don't know for Mac, but on Windows you explicitly need to tag those
symbols which should get exported from the library via
"__declspec(dllexport)" or something like that, otherwise they're not
visible to the outside world. Maybe something similar exists on Mac?
R'
|
|
|
|
|