www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Compile on Cygwin with gdc

reply k2 <k2_member pathlink.com> writes:
I installed Cygwin, and then compiled simple D source.
But, I got error. Is it necessary to set some up?

- test.d -

int mian(char[][] args)
{
return 0;
}

- result -

$ gdc test.d
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libgphobos.a(cmain.o):cmain.d:(.text+
0x1a): undefined reference to `__Dmain'
collect2: ld returned 1 exit status
Aug 11 2005
parent reply Derek Parnell <derek psych.ward> writes:
On Thu, 11 Aug 2005 09:21:52 +0000 (UTC), k2 wrote:

 I installed Cygwin, and then compiled simple D source.
 But, I got error. Is it necessary to set some up?
 
 - test.d -
 
 int mian(char[][] args)
 {
 return 0;
 }
 
 - result -
 
 $ gdc test.d
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libgphobos.a(cmain.o):cmain.d:(.text+
 0x1a): undefined reference to `__Dmain'
 collect2: ld returned 1 exit status
Could it be that you mispelled 'main'? //int mian(char[][] args) int main(char[][] args) { return 0; } -- Derek Parnell Melbourne, Australia 11/08/2005 8:02:14 PM
Aug 11 2005
parent k2 <k2_member pathlink.com> writes:
Oops! I'm fool man... Forget it :-)

Could it be that you mispelled 'main'?

//int mian(char[][] args)
int main(char[][] args)
{
return 0;
}

-- 
Derek Parnell
Melbourne, Australia
11/08/2005 8:02:14 PM
Aug 11 2005