View previous topic :: View next topic |
Author |
Message |
RedOne
Joined: 15 Oct 2006 Posts: 4
|
Posted: Sun Oct 15, 2006 0:30 Post subject: Using Borland C*+ turbo explorer... |
|
|
Hi all, i'm a new user with a (maybe simple, but not to me) question regarding plugin development...
I'm trying to create the plugin using the mentioned ide (here's a link http://www.borland.com/downloads/download_turbo.html ), but after compiling the plugin (yep, it compiles itself!!) and putting it in the server directory, nwnx doesn't recognize it correctly, giving a: "* Error: can not find creation function in nwnx_demoplugin.dll"
As cam be seen, i'm using the demoplugin which cames with nwnx. So, i could have done something wrong in the project definition (no idea, really, first time i try it out :/).
So... any idea what could be wrong?
Any suggestions are welcome ^^
Thanks for any help! |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sun Oct 15, 2006 10:10 Post subject: |
|
|
Does the resulting DLL export the function GetClassObject ? You can check with tools like Dependency Walker (not sure if Borland includes something compareable). Somehow you need to convince the compiler to export it. _________________ Papillon |
|
Back to top |
|
|
RedOne
Joined: 15 Oct 2006 Posts: 4
|
Posted: Sun Oct 15, 2006 20:11 Post subject: |
|
|
I've made a check with the given utility...
It does export a "_GetClassObject" (note the _ before)... maybe that's the problem...
But, on the c code it looks correctly, no "_" before Oo
Ok... after some google and web search, i've found out that every Borland generated dll has a trailing underscore for "C" decorated function names...
I will look for a way to modify the default name mangling behaviour, since i don't consider feasible to ask for a "_GetClassObject" call inside the plugin system too ^^"
Otherwise... could be feasible to make an "adapter" plugin?
Last edited by RedOne on Mon Oct 16, 2006 1:03; edited 1 time in total |
|
Back to top |
|
|
RedOne
Joined: 15 Oct 2006 Posts: 4
|
Posted: Mon Oct 16, 2006 0:44 Post subject: |
|
|
Nevermind...
Found a way to define a new external function to the dll with the correct name (basically, tell the compiler to add an alias with the right name for that function inside the dll).
Now the problem is that the plugin gets loaded ("* Plugin 6 is loaded.") but the server crashes -_-"""
I will need to figure out what was wrong...
ps:
For anyone interested, here's how to do the exported function aliasing in that ide:
http://web.archive.org/web/20031207213941/http://bcbdev.com/articles/bcbdll.htm#example1 |
|
Back to top |
|
|
Dracos
Joined: 16 Oct 2006 Posts: 21
|
Posted: Mon Oct 16, 2006 15:02 Post subject: |
|
|
chiedi a Ishan, Red. |
|
Back to top |
|
|
|