FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Strange "Previous Definition Different" error

 
Post new topic   Reply to topic     Forum Index -> General
View previous topic :: View next topic  
Author Message
Randati



Joined: 16 Apr 2008
Posts: 1

PostPosted: Wed Apr 16, 2008 10:29 am    Post subject: Strange "Previous Definition Different" error Reply with quote

Maybe this belongs to Tango's forum, but...

I have 2 files:

file1.d
Code:
module file1;
import tango.text.xml.Document;
import file2;

void main()
{
   auto doc = new Document!(char);
   func();
}



file2.d
Code:
module file2;
import tango.text.xml.Document;

void func()
{
   auto doc = new Document!(char);
}



If I compile them like this it works just fine.
Code:
dmd file1.d file2.d


But I use Code::Blocks and it compiles them like this:
Code:
dmd -c file1.d -ofobj\file1.obj
dmd -c file2.d -ofobj\file2.obj
dmd file.exe obj\file1.obj obj\file2.obj

But the last command returns:
Code:
C:\D\bin\link.exe obj\file1+obj\file2,file.exe,,user32+kernel32/noi+tango-user-dmd.lib+tangobos.lib;
OPTLINK (R) for Win32  Release 8.00.1
Copyright (C) Digital Mars 1989-2004  All rights reserved.
obj\file2.obj(file2)  Offset 0227CH Record Type 0091
 Error 1: Previous Definition Different : _D5tango4text3xml8Document15__T8DocumentTaZ8Document7Visitor6__initZ
obj\file2.obj(file2)  Offset 022C7H Record Type 0091
 Error 1: Previous Definition Different : _D5tango4text3xml8Document15__T8DocumentTaZ8Document8NodeImpl6__initZ
obj\file2.obj(file2)  Offset 054E9H Record Type 0091
 Error 1: Previous Definition Different : _D5tango4text3xml8Document14__T7XmlPathTaZ7XmlPath7NodeSet6__initZ
--- errorlevel 3


So, why? I have no idea why it doesn't work...

Or maybe someone knows, how can I edit C::B's compiling-command?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> General All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group