|
9th December 2007, 08:40 PM | #1 |
Member
Expert member
Join Date: Jun 2006
Posts: 51
|
plugin that needs other libraries
I'm trying to write a plugin that needs additional libraries on Windows (Visual Studio).
I added the needed libs together with ac3d.lib and the includes and all compiles well to a .dll (named .p). The corresponding additional dll are in the PATH. As long as I do not reference a function in the additional lib it works fine. The plugin is loaded and executes. But as soon as I add any kind of reference to the other lib the plugin is not even loaded. The error message says it cannot find the modul. What do I have to do to create a plugin with additional libs? |
5th January 2008, 01:48 PM | #2 |
Member
Expert member
Join Date: Jun 2006
Posts: 51
|
Re: plugin that needs other libraries
I think I miss a linking option. Just adding the .lib in the additional dependencies is not enough even though the correpsonding .dll is in the PATH.
This is only an issue in Windows. I tried the same in Linux and there it's no problem. The additional shared library is loaded at run-time. Can anybody give me a hint on what I have to add to the linker options so that the plugin loads the additional dependencies? |
6th January 2008, 09:05 PM | #3 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: plugin that needs other libraries
I don't use a lot of external libraries, but I have linked winsock and a few others successfully before. Here's the basic linker options I use:
|
12th January 2008, 12:58 PM | #4 |
Member
Expert member
Join Date: Jun 2006
Posts: 51
|
Re: plugin that needs other libraries
I don't have the option "Per-User Redirection" but the remaining options are the same and I still get an error from AC3D saying the module cannot be found.
Without this library dependency it loads fine. |
16th January 2008, 06:43 PM | #5 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: plugin that needs other libraries
Hmmmm... what happens if you dynamically link the dependent library instead?
|
18th January 2008, 09:54 AM | #6 |
Member
Expert member
Join Date: Jun 2006
Posts: 51
|
Re: plugin that needs other libraries
I tried both - at least I think so. I'm more used to Makefiles and compiling in Linux so I may be doing something wrong here.
I uploaded the project (Visual Studio 2005) to http://www.world-of-mystery.de/jac3d.rar (~2MB) but don't waste too much time. It works with Linux so I have some work-around. |
|
|