FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Solved] Link error

 
Post new topic   Reply to topic     Forum Index -> MiniD
View previous topic :: View next topic  
Author Message
Aphadon



Joined: 16 Aug 2007
Posts: 9

PostPosted: Tue Jun 10, 2008 4:06 pm    Post subject: [Solved] Link error Reply with quote

Hi,

I have a problem compiling a really small program linked with minid.lib

This is the error I get:
Code:
..\lib\minid.lib(misc):
 Error 42: Symbol Undefined _D5minid4misc16__T9FormatterTaZ9FormatterC5tango4text7convert6Layout13__T6LayoutTaZ6Layout


This is the command I compiled the library with (D1.030):
Code:
dmd {all files} -lib -ofminid.lib -O -release


And finally the 'program':
Code:
import tango.io.Stdout;

import minid.minid;
import minid.types;

void main() {
   Stdout("MiniD Test!");
   auto ctx = NewContext();
}


Can someone help me? I just dont get it working...


Last edited by Aphadon on Thu Jun 12, 2008 12:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
JarrettBillingsley



Joined: 20 Jun 2006
Posts: 457
Location: Pennsylvania!

PostPosted: Tue Jun 10, 2008 7:49 pm    Post subject: Reply with quote

This often happens when mixing precompiled libraries with templates on Windows. DMD is probably not actually instantiating and compiling in the minid.misc.Formatter template instantiations. I have also not had any experience with DMD's new -lib flag.

It's recommended that you use a build tool, such as dsss/rebuild or build/bud. Both tools will automatically compile things as needed/imported and should reduce the number of cases in which you'll get missing symbol errors.

If you have dsss, you can install MiniD by getting the MiniD source (which you already have), changing to the directory that contains the "minid" directory (there will be a dsss.conf file in it), and doing "dsss build minid" and then "dsss install", which will build the library and install it as well as the headers. Then you can build your own project using dsss or rebuild and it will "Just Work" Wink
Back to top
View user's profile Send private message
Aphadon



Joined: 16 Aug 2007
Posts: 9

PostPosted: Thu Jun 12, 2008 6:50 am    Post subject: Reply with quote

OK, I got it compiled and running..runs fine now.

Thanks for the Help Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MiniD All times are GMT - 6 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