logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Using Borland C*+ turbo explorer...

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
RedOne



Joined: 15 Oct 2006
Posts: 4

PostPosted: Sun Oct 15, 2006 0:30    Post subject: Using Borland C*+ turbo explorer... Reply with quote

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
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sun Oct 15, 2006 10:10    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
RedOne



Joined: 15 Oct 2006
Posts: 4

PostPosted: Sun Oct 15, 2006 20:11    Post subject: Reply with quote

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
View user's profile Send private message
RedOne



Joined: 15 Oct 2006
Posts: 4

PostPosted: Mon Oct 16, 2006 0:44    Post subject: Reply with quote

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
View user's profile Send private message
Dracos



Joined: 16 Oct 2006
Posts: 21

PostPosted: Mon Oct 16, 2006 15:02    Post subject: Reply with quote

chiedi a Ishan, Red. Wink
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group