Re: [Osalp-dev] linking troubles
Status: Abandoned
                
                Brought to you by:
                
                    daservis
                    
                
            | 
      
      
      From: <for...@ad...> - 2000-12-28 22:41:08
      
     | 
| Darrick Servis wrote: > I first set out to write modules to load Raw and CDR audio files. I don't > have any experience writing modules. But I copied the Wav module and just > made changes to some of the functions. Compiled, installed and updated the > modules_list file. Good. > > I've rewritten a program I have to use aflib and it is linked with -lqt > -lpthread -ldl -lm -lc -laflib and the -rdynamic switch. Problem I'm having > is when I use my new aflibRawFile.so module the linking in my app gets > corrupted. I've never debugged anything like this before and I'm kind of at > a loss on how to do so. Tonight I'll use the example player code to check to > see how well my module is working. I am not to sure what you mean by "the linking in my app gets corrupted" ? I would also recommend you try Electric Fence (a memory debugger) and make sure you don't have any memory problems. I have used it with the player app and it works great. > > So what are the steps in dealing with this. The module works fine the first > couple of times. When I call the qt file dialog the program usually crashes. > I've looked at info sharedlibrary in gdb and it shows that aflibRawFile.so > is loaded but the symbols aren't read. This is after loading a couple of raw > files. Got any debugging tips? > > I just read the man dlopen and my feeling is a symbol from aflib is getting > resloved to a symbol in qt. Possible? I don't see how since your aflibRawFile class should be unique. Make sure that if you call any outside libraries from your module that you link against the .a for that library so that the module stands on its own. > > Sorry I can't be more specific. This is all on the cutting edge of my > knowledge. > > Couple other things: > > in the makefiles for the format libraries. why is the module sometimes > linked to libaudiofile.a and sometimes not. i.e. aflibAifcFile.o is > aflibDevFile.o is not. neither are the mp3 encoders linked to libaudiofile.a > I took the line out on all the files and didn't have a problem. libaudiofile.a is used for reading and writing AIFC, AIFF, AU, and WAV file formats. When one makes a dynamic loaded module it should stand on its own and not need any other libraries except maybe libc and libC. They will all compile without it but it should fail when to try to read from one of these formats. > > I have more questions but I'll figure out my linking problem first. Overall > I like the library. It seems to do what I need it to do. What's the word on > Effect plugins? I have no plans as of yet. When I get a chance I will probably work on filters. But I need to come up with some kind of framework for filters first. Bruce Forsberg |