View previous topic :: View next topic |
Author |
Message |
Aphadon
Joined: 16 Aug 2007 Posts: 9
|
Posted: Tue Jun 10, 2008 4:06 pm Post subject: [Solved] Link error |
|
|
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 |
|
|
JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Tue Jun 10, 2008 7:49 pm Post subject: |
|
|
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" |
|
Back to top |
|
|
Aphadon
Joined: 16 Aug 2007 Posts: 9
|
Posted: Thu Jun 12, 2008 6:50 am Post subject: |
|
|
OK, I got it compiled and running..runs fine now.
Thanks for the Help |
|
Back to top |
|
|
|