Foundation/NSBundle.h and dynamically loadable classes

Foundation/NSBundle.h and dynamically loadable classes

Post by Thomas A » Wed, 03 Apr 1996 04:00:00



Yes, my second post in as many days :).

I was just wondering if anyone has any sample code on how to use this
particular class to facilitate dynamically loadable classes. Or an
explanation would be good. Anything.

This is using GCC under Linux, with libobjects-0.1.19 installed.

I attempted to manually use "objc_load_module" (which appears to use
dlopen), but it results in the following error (trying to load a normal ELF
.o file):

Error (objc-load):Not an ELF shared library

I assume this means it expects a .so file, which I have absolutely no
idea how to make.

Any help on any of these would be nice :).

Thanks,
  Alec Thomas

 
 
 

Foundation/NSBundle.h and dynamically loadable classes

Post by Adam Fedo » Wed, 03 Apr 1996 04:00:00



> I was just wondering if anyone has any sample code on how to use this
> particular class to facilitate dynamically loadable classes. Or an
> explanation would be good. Anything.

> This is using GCC under Linux, with libobjects-0.1.19 installed.

Did the checks/nsbundle program in libobjects not work? The
checks/Makefile and also the examples/Makefile.example.in should be set
up correctly so that it should compile bundles correctly.

If you find that it doesn't work and/or figure out how it does work,
please let me know so I can update libobjects to account for this.

---
Adam Fedor. CU, Boulder             | If you're not living on the edge, you're



 
 
 

1. Microsoft Foundation classes and virtually derived classes

In using the Microsoft Visual C++ programming environment with the
Microsoft Foundation Classes for the first time, creating a Windows
executable, I have found difficulty in trying to due the following:

class A {
        public:
        A(){};
        ~A(){};

class B : public virtual A
{
        public:
        B(){};
        ~B(){};

class C: public virtual A
{
        public:
        C(){};
        ~C(){};

I compile with normal options and link without any difficulty however when I go
to run the application under Windows3.1 an immediate error message is displayed
saying:

        An error has occured in your application. If you choose Ignore, you should
        save your work in a new file.  If you choose Close, your apllication will terminate.

        After selecting Close, I get another error dialog stating

        Application caused a General Protection Fault in module app.exe at 0001:0096

As a side note,  I create a seperate project without the use of the MFC class information
and the exact same code works.

2. accessories

3. Request from Win32 Foundation Classes (WFC) author

4. CAT65xx - running in routed mode

5. Is it worth using Microsoft's Foundation Class Library

6. SS10 GX frame buffer

7. Problem with Visual C++/Foundation class

8. syslog configuration

9. Foundation classes in BC++ 4.5

10. Microsoft Foundation Classes?

11. INFO: Microsoft Foundation Class FAQ: How to get it