Thread overview | ||||||
---|---|---|---|---|---|---|
|
April 08, 2005 Linking problems with mintl | ||||
---|---|---|---|---|
| ||||
(Sorry if this post comes twice.) I'm sure I'm doing something stupid here, but shouldn't this work? import mintl.slist; class MyClass{} alias SList!(MyClass) MyList; void main() {} I get the following result: $ dmd bug.d libmintl_debug.a gcc bug.o -o bug ../../software/lib/libmintl_debug.a -lphobos -lpthread -lm -Xlinker -L/mn/tid/teori-s1/mortennk/uhh___filerogslikt/software/lib bug.o(.gnu.linkonce.t_D5mintl5slist19SList_C3bug7MyClass5SList238MCommonSList_S5mintl5slist19SNode_C3bug7MyClass5SNode__88__D5mintl5slist19SList_C3bug7MyClass5SList4headPS5mintl5slist19SNode_C3bug7MyClass5SNodeS5mintl5slist19SList_C3bug7MyClass5SListC3bug7MyClassS5mintl5slist19SList_C3bug7MyClass5SList8opEqualsFS5mintl5slist19SList_C3bug7MyClass5SListZi+0x4a): In function `_D5mintl5slist19SList_C3bug7MyClass5SList238MCommonSList_S5mintl5slist19SNode_C3bug7MyClass5SNode__88__D5mintl5slist19SList_C3bug7MyClass5SList4headPS5mintl5slist19SNode_C3bug7MyClass5SNodeS5mintl5slist19SList_C3bug7MyClass5SListC3bug7MyClassS5mintl5slist19SList_C3bug7MyClass5SList8opEqualsFS5mintl5slist19SList_C3bug7MyClass5SListZi': : undefined reference to `_init_22TypeInfo_C3bug7MyClass' bug.o(.gnu.linkonce.t_D5mintl5slist19SList_C3bug7MyClass5SList71MListCatOperators_C3bug7MyClassS5mintl5slist19SList_C3bug7MyClass5SList3addFYv+0x2c): In function `_D5mintl5slist19SList_C3bug7MyClass5SList71MListCatOperators_C3bug7MyClassS5mintl5slist19SList_C3bug7MyClass5SList3addFYv': : undefined reference to `_init_22TypeInfo_C3bug7MyClass' collect2: ld returned 1 exit status --- errorlevel 1 I am using dmd 0.119 on linux. What am I doing wrong? Nick |
April 08, 2005 Re: Linking problems with mintl | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick | "Nick" <Nick_member@pathlink.com> wrote in message news:d36bed$2s31$1@digitaldaemon.com... > (Sorry if this post comes twice.) I'm sure I'm doing something stupid > here, but > shouldn't this work? > > import mintl.slist; > class MyClass{} > alias SList!(MyClass) MyList; > void main() {} I don't have my Linux box near me right now - I tried it on Windows and it work ok (with dmd119) so there could be a problem with linux library. Change to the mintl library and try "make -f linux.mak" (though one needs to pay attention to the DFLAGS to see if it is building a debug or non-debug build). Given that it is erroring in a template function, though, I'm somewhat dubious that the library is really the culprit. It it interesting that it is complaining about opEquals since that is what currently causes build problems with dmd-120 (the latest error is opEquals taking List* or List argument). Unfortunately I only be able to see what's going on after the weekend. -Ben |
April 08, 2005 Re: Linking problems with mintl | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | In article <d36gtr$om$1@digitaldaemon.com>, Ben Hinkle says... > >I don't have my Linux box near me right now - I tried it on Windows and it work ok (with dmd119) so there could be a problem with linux library. Change to the mintl library and try "make -f linux.mak" (though one needs to pay attention to the DFLAGS to see if it is building a debug or non-debug build). Given that it is erroring in a template function, though, I'm somewhat dubious that the library is really the culprit. It it interesting that it is complaining about opEquals since that is what currently causes build problems with dmd-120 (the latest error is opEquals taking List* or List argument). Unfortunately I only be able to see what's going on after the weekend. Rebuilding the lib didn't seem to help anything. However, I do get the following linker warnings when rebuilding the unittest (and my own program too): /usr/bin/ld: Warning: size of symbol `_D3std6stdarg8va_arg_i6va_argFKPvZi' changed from 18 in libmintl_debug.a(arraylist.o) to 21 in libmintl_debug.a(arraylist.o) /usr/bin/ld: Warning: size of symbol `_D3std6stdarg9va_arg_Aa6va_argFKPvZAa' changed from 23 in libmintl_debug.a(arraylist.o) to 34 in libmintl_debug.a(arraylist.o) I don't know if this is related or helps anything. Nick |
April 08, 2005 Re: Linking problems with mintl | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick | > Rebuilding the lib didn't seem to help anything. However, I do get the
> following
> linker warnings when rebuilding the unittest (and my own program too):
>
> /usr/bin/ld: Warning: size of symbol `_D3std6stdarg8va_arg_i6va_argFKPvZi'
> changed from 18 in libmintl_debug.a(arraylist.o) to 21 in
> libmintl_debug.a(arraylist.o)
> /usr/bin/ld: Warning: size of symbol
> `_D3std6stdarg9va_arg_Aa6va_argFKPvZAa'
> changed from 23 in libmintl_debug.a(arraylist.o) to 34 in
> libmintl_debug.a(arraylist.o)
>
> I don't know if this is related or helps anything.
The warnings are safe to ignore (from what I've been told). I get those, too, on Linux in stuff using varargs.
|
Copyright © 1999-2021 by the D Language Foundation