www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Tangobos build problem

reply Simen Haugen <simen norstat.no> writes:
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...
Sep 04 2008
next sibling parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
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
Sep 04 2008
parent Simen Haugen <simen norstat.no> writes:
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 :)
Sep 05 2008
prev sibling parent reply "Bill Baxter" <wbaxter gmail.com> writes:
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
Sep 04 2008
parent reply Simen Haugen <simen norstat.no> writes:
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?
Sep 05 2008
parent torhu <no spam.invalid> writes:
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.
Sep 06 2008