Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
September 04, 2008 Tangobos build problem | ||||
---|---|---|---|---|
| ||||
I'm using tango, but couldn't find any COM libraries. I thought about starting one myself, but as I have very simple needs with only one specific library I concluded it wasn't worth it. Then I found juno! Seemed simple enough, but it's phobos only. I installed tangobos, but I cannot seem to mix tango/phobos. .\std-c-stdlib.obj(std-c-stdlib) Offset 00234H Record Type 0091 Error 1: Previous Definition Different : _EXIT_SUCCESS .\std-c-stdlib.obj(std-c-stdlib) Offset 002ECH Record Type 0091 Error 1: Previous Definition Different : _EXIT_FAILURE But when I look at the files, I cannot see any difference at all... |
September 04, 2008 Re: Tangobos build problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simen Haugen | Simen Haugen wrote: > I'm using tango, but couldn't find any COM libraries. I thought about starting one myself, but as I have very simple needs with only one specific library I concluded it wasn't worth it. > > Then I found juno! Seemed simple enough, but it's phobos only. I installed tangobos, but I cannot seem to mix tango/phobos. > > .\std-c-stdlib.obj(std-c-stdlib) Offset 00234H Record Type 0091 > Error 1: Previous Definition Different : _EXIT_SUCCESS > .\std-c-stdlib.obj(std-c-stdlib) Offset 002ECH Record Type 0091 > Error 1: Previous Definition Different : _EXIT_FAILURE > > But when I look at the files, I cannot see any difference at all... Try the DWin project - should be much of the same for Tango. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango |
September 04, 2008 Re: Tangobos build problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simen Haugen | On Thu, Sep 4, 2008 at 10:07 PM, Simen Haugen <simen@norstat.no> wrote:
> I'm using tango, but couldn't find any COM libraries. I thought about starting one myself, but as I have very simple needs with only one specific library I concluded it wasn't worth it.
>
> Then I found juno! Seemed simple enough, but it's phobos only. I installed tangobos, but I cannot seem to mix tango/phobos.
>
> .\std-c-stdlib.obj(std-c-stdlib) Offset 00234H Record Type 0091
> Error 1: Previous Definition Different : _EXIT_SUCCESS
> .\std-c-stdlib.obj(std-c-stdlib) Offset 002ECH Record Type 0091
> Error 1: Previous Definition Different : _EXIT_FAILURE
>
> But when I look at the files, I cannot see any difference at all...
>
I seem to recall those are the kinds of errors you run into when you define constants in an extern(Windows) block as "const" instead of using an enum. The problem is that extern(Windows) things don't get mangled with their package name, so if you have the same constant in two places you will get a clash. Enums doing use storage, though, so they don't clash. Maybe that will help you get to the root of the problem.
--bb
|
September 05, 2008 Re: Tangobos build problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars Ivar Igesund | Lars Ivar Igesund wrote:
> Simen Haugen wrote:
>
>> I'm using tango, but couldn't find any COM libraries. I thought about
>> starting one myself, but as I have very simple needs with only one
>> specific library I concluded it wasn't worth it.
>>
>> Then I found juno! Seemed simple enough, but it's phobos only.
>> I installed tangobos, but I cannot seem to mix tango/phobos.
>>
>> .\std-c-stdlib.obj(std-c-stdlib) Offset 00234H Record Type 0091
>> Error 1: Previous Definition Different : _EXIT_SUCCESS
>> .\std-c-stdlib.obj(std-c-stdlib) Offset 002ECH Record Type 0091
>> Error 1: Previous Definition Different : _EXIT_FAILURE
>>
>> But when I look at the files, I cannot see any difference at all...
>
> Try the DWin project - should be much of the same for Tango.
>
Takker!
It works like a charm, I only wish I had found dwin 5 hours earlier :)
|
September 05, 2008 Re: Tangobos build problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter wrote:
> On Thu, Sep 4, 2008 at 10:07 PM, Simen Haugen <simen@norstat.no> wrote:
>> I'm using tango, but couldn't find any COM libraries. I thought about
>> starting one myself, but as I have very simple needs with only one specific
>> library I concluded it wasn't worth it.
>>
>> Then I found juno! Seemed simple enough, but it's phobos only.
>> I installed tangobos, but I cannot seem to mix tango/phobos.
>>
>> .\std-c-stdlib.obj(std-c-stdlib) Offset 00234H Record Type 0091
>> Error 1: Previous Definition Different : _EXIT_SUCCESS
>> .\std-c-stdlib.obj(std-c-stdlib) Offset 002ECH Record Type 0091
>> Error 1: Previous Definition Different : _EXIT_FAILURE
>>
>> But when I look at the files, I cannot see any difference at all...
>>
>
> I seem to recall those are the kinds of errors you run into when you
> define constants in an extern(Windows) block as "const" instead of
> using an enum. The problem is that extern(Windows) things don't get
> mangled with their package name, so if you have the same constant in
> two places you will get a clash. Enums doing use storage, though, so
> they don't clash. Maybe that will help you get to the root of the
> problem.
>
> --bb
But then I cannot see how anyone including stdlib is able to compile.
Shouldn't both tangobos and tango change these to enums then?
|
September 06, 2008 Re: Tangobos build problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simen Haugen | Simen Haugen wrote:
> Bill Baxter wrote:
>> On Thu, Sep 4, 2008 at 10:07 PM, Simen Haugen <simen@norstat.no> wrote:
>>> I'm using tango, but couldn't find any COM libraries. I thought about
>>> starting one myself, but as I have very simple needs with only one specific
>>> library I concluded it wasn't worth it.
>>>
>>> Then I found juno! Seemed simple enough, but it's phobos only.
>>> I installed tangobos, but I cannot seem to mix tango/phobos.
>>>
>>> .\std-c-stdlib.obj(std-c-stdlib) Offset 00234H Record Type 0091
>>> Error 1: Previous Definition Different : _EXIT_SUCCESS
>>> .\std-c-stdlib.obj(std-c-stdlib) Offset 002ECH Record Type 0091
>>> Error 1: Previous Definition Different : _EXIT_FAILURE
>>>
>>> But when I look at the files, I cannot see any difference at all...
>>>
>>
>> I seem to recall those are the kinds of errors you run into when you
>> define constants in an extern(Windows) block as "const" instead of
>> using an enum. The problem is that extern(Windows) things don't get
>> mangled with their package name, so if you have the same constant in
>> two places you will get a clash. Enums doing use storage, though, so
>> they don't clash. Maybe that will help you get to the root of the
>> problem.
>>
>> --bb
>
> But then I cannot see how anyone including stdlib is able to compile.
> Shouldn't both tangobos and tango change these to enums then?
>
Then problem is when you try to link two libraries and both of them define the same constant, and they do it like this:
extern (C) const int EXIT_SUCCESS = 0;
Which results in both compiling to the symbol _EXIT_SUCCESS. There's no point in using extern (C) with those constants, but both phobos and tango do it anyway, which causes trouble with tangobos. Some of them are changed to enums now, but apparently not all.
When I was using tangobos, I just commented out the duplicate definitions in tangobos. Or you can prefix them with extern (D), I guess. Or make them enums.
|
Copyright © 1999-2021 by the D Language Foundation