View previous topic :: View next topic |
Author |
Message |
lpw
Joined: 17 Nov 2006 Posts: 4
|
Posted: Fri Nov 17, 2006 2:52 pm Post subject: cannot resolve symbol in loadAndLink |
|
|
Ok, so yesterday I discovered D. Coupled with DDL, it gave me pleasure in the most unlikely places. So I grabbed the latest DMD (0.174) along with today's SVN snapshots of mango and DDL. Following along with the plugin tutorial, I got to the "it compiles" stage. Yet, trying to run 'quick' I get the following error:
Error: cannot resolve symbol: (cannot Self Resolve) [902890] weak local _D6plugin10helloWorldFZAa
This seems to be emitted from ddl.Linker:221. Not sure how to proceed. Oh yeah, the O/S is Windoze XP.
Cheers and thanks,
Lukasz |
|
Back to top |
|
|
h3r3tic
Joined: 30 Mar 2004 Posts: 261 Location: Torun, Poland
|
Posted: Sat Nov 18, 2006 11:14 pm Post subject: |
|
|
Hmmm.. looks like either the 'quick' sample is wrong or the symbol is incorrectly recognized as 'weak'. This may be due to some heavy changes in DDL about a week ago. Try this one:
Code: | import ddl.DefaultRegistry;
import ddl.Linker;
import mango.io.Stdout;
void main(){
auto linker = new Linker(new DefaultRegistry());
linker.loadAndRegister("quick.map");
auto plugin = linker.load("plugin.obj");
linker.register(plugin);
linker.link(plugin);
auto helloWorld = plugin.getDExport!(char[] function(),"plugin.helloWorld")();
Stdout.put(helloWorld());
Stdout.put(CR);
} |
Btw, are you Polish ? Your name looks Polish to me and I'm from Torun, Poland myself |
|
Back to top |
|
|
lpw
Joined: 17 Nov 2006 Posts: 4
|
Posted: Sun Nov 19, 2006 10:09 am Post subject: |
|
|
You the man, h3r3tic, that fixed it. And yes, I am Polish, but I live in Canada now. I was born in Chorzow, then lived the first 13-ish years of my life near Katowice. I'm thinking of going back for a visit next summer... Time will tell, it always does. Thanks again for your help, and keep up the great work!
Cheers,
Lukasz |
|
Back to top |
|
|
|
|
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
|