Trouble with modules
Andrew Madigan
amadigan at gmail.com
Sat Apr 15 08:27:45 PDT 2006
Andrew Madigan wrote:
> Chris Nicholson-Sauls wrote:
>
>> Andrew Madigan wrote:
>>>
>>> andymadigan at andym:~/dhttp$ gdc -c Request.d HttpCommon.d
>>> Request.d:5: module HttpCommmon cannot read file 'HttpCommmon.d'
>>>
>>> Note that HttpCommon.d does build fine.
>>
>> I have actually done almost this exactly same thing... multiple times.
>> You have three 'm's in HttpCommmon in Request.d line 5.
>>
>> -- Chris Nicholson-Sauls
>
> Wow, I need to stop making dumb posts to this forum, I must have looked at
> that same line of code 50 times.
Allright, now I'm getting a related error, there are two functions defined
in HttpCommon.d (they're global). I'm getting errors about multiple
definition. What should I do?
gdc HttpCommon.d -o http Application.o HttpCommon.o http.o
InterruptableThread.o Request.o RequestThread.o RootApplication
.o StatusCode.o TestApp.o WebServer.o
HttpCommon.o: In function
`_D10HttpCommon10HttpCommon15getProtocolNameFE10HttpCommon8ProtocolZAa
':HttpCommon.d:(.text+0x0):
multiple definition of
`_D10HttpCommon10HttpCommon15getProtocolNameFE10HttpCommon8ProtocolZAa'
/tmp/cccBIwTr.o:HttpCommon.d:(.text+0x0): first defined here
HttpCommon.o: In function
`_D10HttpCommon10HttpCommon17getProtocolByNameFAaZE10HttpCommon8Protocol
':HttpCommon.d:(.text+0x5
e): multiple definition of
`_D10HttpCommon10HttpCommon17getProtocolByNameFAaZE10HttpCommon8Protocol'
/tmp/cccBIwTr.o:HttpCommon.d:(.text+0x5e): first defined here
HttpCommon.o:(.rodata+0x14): multiple definition of
`_init_10HttpCommon10HttpCommon'
/tmp/cccBIwTr.o:(.rodata+0x14): first defined here
HttpCommon.o:(.rodata+0x28): multiple definition of
`_vtbl_10HttpCommon10HttpCommon'
/tmp/cccBIwTr.o:(.rodata+0x28): first defined here
HttpCommon.o:(.data+0x0): multiple definition of
`_Class_10HttpCommon10HttpCommon'
/tmp/cccBIwTr.o:(.data+0x0): first defined here
collect2: ld returned 1 exit status
make: *** [http] Error 1
More information about the Digitalmars-d-learn
mailing list