Go Back   AC3D Forums > Technical > AC3D Developers
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 9th December 2007, 08:40 PM   #1
Galun
Member
Expert member
 
Join Date: Jun 2006
Posts: 51
Default 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?
Galun is offline   Reply With Quote
Old 5th January 2008, 01:48 PM   #2
Galun
Member
Expert member
 
Join Date: Jun 2006
Posts: 51
Default 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?
Galun is offline   Reply With Quote
Old 6th January 2008, 09:05 PM   #3
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default 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:
Attached Thumbnails
Click image for larger version

Name:	linker.jpg
Views:	389
Size:	79.0 KB
ID:	652  

lisa is offline   Reply With Quote
Old 12th January 2008, 12:58 PM   #4
Galun
Member
Expert member
 
Join Date: Jun 2006
Posts: 51
Default 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.
Galun is offline   Reply With Quote
Old 16th January 2008, 06:43 PM   #5
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default Re: plugin that needs other libraries

Hmmmm... what happens if you dynamically link the dependent library instead?
lisa is offline   Reply With Quote
Old 18th January 2008, 09:54 AM   #6
Galun
Member
Expert member
 
Join Date: Jun 2006
Posts: 51
Default 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.
Galun is offline   Reply With Quote
Old 18th January 2008, 04:06 PM   #7
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default Re: plugin that needs other libraries

Lol! You didn't mention you were trying to launch JNI! Holy cow!

I don't have the JDK in front of me right now, but do I have it on a different computer... let me get back to you on this one.
lisa is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 06:10 AM.


AC3D Forum
(C) Inivis Limited 2020