digitalmars.D.learn - problem with gdc for OSX?
- MLT (17/17) Apr 19 2009 Sorry, this could be a bug report and not a question, and probably the w...
- Denis Koroskin (3/25) Apr 19 2009 Bad installation, I suppose. 'string' is defined in Object.d, which is a...
- MLT (14/16) Apr 20 2009 source file. Error is defined there, too. Looks like it can't find it. M...
- Jacob Carlborg (3/22) Apr 21 2009 DFLAGS is working for me. I've placed dmd.conf in the same folder as
- =?UTF-8?B?QW5kZXJzIEYgQmrDtnJrbHVuZA==?= (3/4) Apr 21 2009 Sure it does, it's just that it is symlinked into /private.
- MLT (5/7) Apr 21 2009 That was the problem:
- =?UTF-8?B?QW5kZXJzIEYgQmrDtnJrbHVuZA==?= (4/25) Apr 21 2009 That looks like a Phobos program, maybe you need Tangobos (std.compat) ?
Sorry, this could be a bug report and not a question, and probably the wrong place to post it then. I installed gdc according to the instructions given in http://www.dsource.org/projects/tango/wiki/MacOSXInstall from http://sourceforge.net/project/downloading.php?group_id=135857&filename=gdc-trunk-r229- mac-10.5.dmg&a=83983351 Install went well, compiling tango went well. Compiling programs with tango works well. However, now when I try to compile the simplest program that uses std.stdio I get many errors, starting with: ldblcompat.d:36: Error: identifier 'string' is not defined (below it, many complaints about string not defined, and also include/d/4.0.1/std/format.d:75: Error: Error is used as a type ) My program is this: import std.stdio ; int main() { writefln("Hello world!\n") ; } What am I doing wrong?
Apr 19 2009
On Sun, 19 Apr 2009 12:37:11 +0400, MLT <none anon.com> wrote:Sorry, this could be a bug report and not a question, and probably the wrong place to post it then. I installed gdc according to the instructions given in http://www.dsource.org/projects/tango/wiki/MacOSXInstall from http://sourceforge.net/project/downloading.php?group_id=135857&filename=gdc-trunk-r229- mac-10.5.dmg&a=83983351 Install went well, compiling tango went well. Compiling programs with tango works well. However, now when I try to compile the simplest program that uses std.stdio I get many errors, starting with: ldblcompat.d:36: Error: identifier 'string' is not defined (below it, many complaints about string not defined, and also include/d/4.0.1/std/format.d:75: Error: Error is used as a type ) My program is this: import std.stdio ; int main() { writefln("Hello world!\n") ; } What am I doing wrong?Bad installation, I suppose. 'string' is defined in Object.d, which is automatically imported in each source file. Error is defined there, too. Looks like it can't find it. Make sure it does exist and paths are properly configured. In a meanwhile try using DMD, it has OSX support now.
Apr 19 2009
== Quote from Denis Koroskin (2korden gmail.com)'s articleBad installation, I suppose. 'string' is defined in Object.d, which is automatically imported in eachsource file. Error is defined there, too. Looks like it can't find it. Make sure it does exist and paths are properly configured.In a meanwhile try using DMD, it has OSX support now.Thanks! Yes, dmd works. I think it is a problem with the gcd package I used, because I had the same problem on two different computers. (Well, or I did the same mistakes) I wanted to use gdc because supposedly it works better with Xcode (though I haven't gotten that to work, yet). Something is definitely wrong with my installation. But I don't know what. What are the right files to look at? I didn't see a message about Object.d not being found. Is that the problem? I also noticed that /etc/dmd.conf and the environment variable DFLAGS didn't seem to have any effect on dmd on my mac. Modifying both had no effect, but compiling with "dmd $DFLAGS ..." worked. What is the right way to do things? thanks!
Apr 20 2009
MLT wrote:== Quote from Denis Koroskin (2korden gmail.com)'s articleDFLAGS is working for me. I've placed dmd.conf in the same folder as dmd. Mac OS X doesn't have /etc by default.Bad installation, I suppose. 'string' is defined in Object.d, which is automatically imported in eachsource file. Error is defined there, too. Looks like it can't find it. Make sure it does exist and paths are properly configured.In a meanwhile try using DMD, it has OSX support now.Thanks! Yes, dmd works. I think it is a problem with the gcd package I used, because I had the same problem on two different computers. (Well, or I did the same mistakes) I wanted to use gdc because supposedly it works better with Xcode (though I haven't gotten that to work, yet). Something is definitely wrong with my installation. But I don't know what. What are the right files to look at? I didn't see a message about Object.d not being found. Is that the problem? I also noticed that /etc/dmd.conf and the environment variable DFLAGS didn't seem to have any effect on dmd on my mac. Modifying both had no effect, but compiling with "dmd $DFLAGS ..." worked. What is the right way to do things? thanks!
Apr 21 2009
Jacob Carlborg wrote:Mac OS X doesn't have /etc by default.Sure it does, it's just that it is symlinked into /private. --anders
Apr 21 2009
Jacob Carlborg Wrote:DFLAGS is working for me. I've placed dmd.conf in the same folder as dmd. Mac OS X doesn't have /etc by default.That was the problem: dmd.conf was copied to /usr/local/bin The copy in /etc did nothing. The copy in /usr/local/bin was overriding any DFLAGS I set. And I couldn't get dmd to tell me where the config file that it is using is.
Apr 21 2009
MLT wrote:Sorry, this could be a bug report and not a question, and probably the wrong place to post it then. I installed gdc according to the instructions given in http://www.dsource.org/projects/tango/wiki/MacOSXInstall from http://sourceforge.net/project/downloading.php?group_id=135857&filename=gdc-trunk-r229- mac-10.5.dmg&a=83983351 Install went well, compiling tango went well. Compiling programs with tango works well. However, now when I try to compile the simplest program that uses std.stdio I get many errors, starting with: ldblcompat.d:36: Error: identifier 'string' is not defined (below it, many complaints about string not defined, and also include/d/4.0.1/std/format.d:75: Error: Error is used as a type )How did you install Tango ? Not with the package but manual, I take it ?My program is this: import std.stdio ; int main() { writefln("Hello world!\n") ; } What am I doing wrong?That looks like a Phobos program, maybe you need Tangobos (std.compat) ? --anders
Apr 21 2009