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

Compiling/Linking/Building with mango

 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
antdengineer



Joined: 06 Jul 2006
Posts: 10

PostPosted: Thu Jul 06, 2006 8:13 am    Post subject: Compiling/Linking/Building with mango Reply with quote

Hello all,

Im new to the D language and I have some questions about compiling with the mango library. I am easily able to create the .o file for my little example program by using -I/path_to_mango_src and -c. When I try without the -c option i get linker errors because Im not providing a mango library file to the linker. I guess it would be good to create a mango.a but Im also reading about the build program which may be better to use. I was able to get build compiled using the provided unix make file. I then used the command

Code:
build -I/path_to_mango_src test.d path_to_mango_src/build/mango.lib


This gave the error:

Code:
String.d(655): function mango.text.String.MutableStringTemplate!(char).MutableStringTemplate.truncate expected to return a value of type mango.text.String.MutableStringTemplate!(char).MutableStringTemplate


Im not sure If im doing something wrong in the build process here or what the best way to do this is.

Thanks for your help.
Back to top
View user's profile Send private message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Thu Jul 06, 2006 9:25 am    Post subject: Reply with quote

It looks like Kris has to update Mango for the latest versions of DMD. Maybe you can go back one or two DMD versions meanwhile.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
antdengineer



Joined: 06 Jul 2006
Posts: 10

PostPosted: Thu Jul 06, 2006 10:07 am    Post subject: Reply with quote

Is there a place where one can find old dmd versions? I dont see that on the digital mars site.
Back to top
View user's profile Send private message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Thu Jul 06, 2006 10:50 am    Post subject: Reply with quote

http://www.digitalmars.com/d/changelog.html
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Thu Jul 06, 2006 4:07 pm    Post subject: Reply with quote

Actually, I think he may just be trying to work with an older version of Mango. I haven't had any issues with Mango and the latest DMD, but then again I also always use the latest SVN snapshot of Mango. (And don't compile to a .lib/.a either.)

I would recommend just checking out the Mango repository and trying to compile that.
_________________
Chris Nicholson-Sauls
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
antdengineer



Joined: 06 Jul 2006
Posts: 10

PostPosted: Thu Jul 06, 2006 6:57 pm    Post subject: Reply with quote

Ok, I am now using the latest version of DMD with the latest mango files checked out from svn. I would like to avoid using an older version of dmd if possible. There is now a different error. To me this sounds like a problem with the compiler version as well:

Code:
/home/anthony/workspace/include/mango/mango/cluster/qos/socket/ClusterServer.d(449): shadowing declaration mango.cluster.qos.socket.ClusterServer.CacheServer.LoaderThread.load.p is deprecated


I am also wondering if im using build incorrectly. I see that there is a mango.d and a mango.brf file in the build directory of the mango head. This same error occurs when I try:

Code:
build path_to_mango_src/build/mango.d test.d

(in the directory of my program)

or

Code:
build mango.brf

(in the mango build directory)

I am now going to try some other versions of dmd. Does anyone have any other suggestions? Thanks again.
Back to top
View user's profile Send private message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Thu Jul 06, 2006 7:35 pm    Post subject: Reply with quote

I'm telling you: Kris needs to update Mango. Compile with -d (or add it to the brf)
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
antdengineer



Joined: 06 Jul 2006
Posts: 10

PostPosted: Sat Jul 08, 2006 5:22 pm    Post subject: Reply with quote

Mango compiles fine now (DMD .162) if I run build mango in the mango build directory. There were some updates made by teqdruid. I just have one more problem/question. When I try to compile my example program using build I get:

Code:

gcc: /home/anthony/workspace/include/mango/mango/text/String.o: No such file or directory
gcc: /home/anthony/workspace/include/mango/mango/text/Text.o: No such file or directory
gcc: /home/anthony/workspace/include/mango/mango/convert/Type.o: No such file or directory
gcc: /home/anthony/workspace/include/mango/mango/convert/Format.o: No such file or directory
gcc: /home/anthony/workspace/include/mango/mango/convert/Integer.o: No such file or directory
gcc: /home/anthony/workspace/include/mango/mango/convert/Atoi.o: No such file or directory
gcc: /home/anthony/workspace/include/mango/mango/convert/Unicode.o: No such file or directory
gcc: /home/anthony/workspace/include/mango/mango/io/model/IWriter.o: No such file or directory
gcc: /home/anthony/workspace/include/mango/mango/io/model/IBuffer.o: No such file or directory
gcc: /home/anthony/workspace/include/mango/mango/io/model/IConduit.o: No such file or directory
gcc: /home/anthony/workspace/include/mango/mango/text/model/UniString.o: No such file or directory


Build does look at my import statements as said in the documentation and makes .o files for all the needed mango source modules and puts them in the directory of my test programs source. It does not, however, link there object files together as an executable. If i use dmd on all the object files I do get an executable. Shouldnt build do this by default?
Back to top
View user's profile Send private message
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Tue Jul 11, 2006 11:00 am    Post subject: Reply with quote

Yes, build should do it by default. It's probably broken on Unix. I've just emailed you a version which I know to be working. BTW, you can just call me "John" or "John Demme" here, since there are a few Johns.

~John Demme
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango 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