Round Two, Shared Libraries 
Author Message
 Round Two, Shared Libraries

So here we are again.  I can find almost no documentation in the building of
a shared library.  I can see why most people say that building a plug-in
would be better, it is better documented.  There is less than one-half page
in the Developer manual devoted to shared libraries and Matt's book assumes
that the library is already built (like the InterfaceLib).

so I'm knee deep in codewarrior 7 trying (and failing) to figure it all out.
I scrapped my test and opted for the Metrowerks included simple shared
library "BeepTwice."  I compile in codewarrior for carbon, I run RB 4 Carbon
(OS 9.2.2), the library is placed at the same level as RB 4 Carbon (I even
placed copies in the extension folder and in the folder of the rb project

Codewarrior code:
#include <Sound.h>
#pragma export on
int BeepTwice ( void );
#pragma export off
int BeepTwice (void)
    return 0;


RB code:
  dim r as integer
  r = MyCarbonSharedLib.BeepTwice()

I know that I have all the symbols exported correctly.  It compile fine with
no errors.  Entry points are properly set up in RB, etc.  Yet I continually
get the error...
"Unable to connect to fragment MyCarbonSharedLib"

So what does this mean?  Does it mean that RB can't find MyCarbonSharedLib?
Does it mean that RB can't find the entry points in MyCarbonSharedLib?  Does
it mean that there are some still unresolved settings in codewarrior that I
have overlooked?

There is very little documentation and/or tutorials on shared libraries.  I
think that if I can get this to work, I just might post a step-by-step on
HOW I got it to work.

Any pointer?

Bruce Johnson

Fri, 06 Aug 2004 07:26:56 GMT  
 Round Two, Shared Libraries
Just when things were at their blackest...

It turns out that the codewarrior shared library example, itself uses a
shared library called "MSL_All_Carbon.Shlb" and it too, needs to be at the
same level as your (my) shared library.

Doesn't make much sense, but it does work!

Bruce Johnson

Fri, 06 Aug 2004 08:08:03 GMT  
 [ 2 post ] 

 Relevant Pages 

1. FORTRAN common in AIX shared library not shared at runtime (0/1)

2. Tcl shared libraries and static libraries

3. Formulas button will not let me round to two decimals

4. Forth and Hypertext (round two:-)

5. Ada and Multimedia (round two)

6. round rounds right?

7. Round and Round we go

8. Modules shared between two apps?

9. Two dictionaries sharing one file

10. Sharing Memory between two seperate Apps

11. Sharing code between two .app files

12. Sharing two PC's


Powered by phpBB® Forum Software