Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <019d01c0bdec$c9dfe900$99face88@dcu.ie> Reply-To: "Latyr Jean-Luc FAYE" From: "Latyr Jean-Luc FAYE" To: "Cygwin" Subject: Compilation error Date: Thu, 5 Apr 2001 17:23:45 +0100 Organization: Dublin City University MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Hi I hope that it is the right place to ask my question. I am trying to compile a C program under Cygwin with gcc but I got errors. My configuration is : Laptop Compaq serie 1200 Model 12XL222 56Mo RAM (64-8 for Video) HD 6Go split in 2 partitions 4Go and 2Go OS : Windows 98 SE My file is in the 2Go partition and Cygwin as well Can somebody tell me what's wrong. Regards Jean-Luc Here is the error latyr AT LATYR /cygdrive/d/allprogs $ gcc -lm -otest.exe image1.c /cygdrive/c/WINDOWS/TEMP/ccobIwme.o(.text+0x4bc):image1.c: multiple definition of `main' /usr/lib/libm.a(libcmain.o)(.text+0x0):libcmain.c: first defined here /usr/lib/libm.a(libcmain.o)(.text+0x6a):libcmain.c: undefined reference to `WinMain AT 16' collect2: ld returned 1 exit status latyr AT LATYR /cygdrive/d/allprogs $ Here is my code #include #include #define N 8 #define M 8 #define pi 3.141592654 #define coeff 0.707106781 static double block1[M][N]={ {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}}; static double block2[M][N]={ { 0, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}, {255, 255, 255, 255, 255, 255, 255, 255}}; static double block3[M][N]={ {255, 255, 255, 255, 255, 255, 255, 255}, { 0, 0, 0, 0, 0, 0, 0, 0}, {255, 255, 255, 255, 255, 255, 255, 255}, { 0, 0, 0, 0, 0, 0, 0, 0}, {255, 255, 255, 255, 255, 255, 255, 255}, { 0, 0, 0, 0, 0, 0, 0, 0}, {255, 255, 255, 255, 255, 255, 255, 255}, { 0, 0, 0, 0, 0, 0, 0, 0}}; /******************************************************** * void dct(double forward[M][N], double DCT[M][N]) * * Forward Discrete Cosine Transform of MxN array * * Parameters : * * forward - MxN array of data to transform * * DCT - MxN array of transformed data * ********************************************************/ void dct(double forward[M][N], double DCT[M][N]) { int u, v; /* Frequency domain variables */ int x, y; /* Spatial domain variables */ double accum; /* Accumulator */ double twoN; /* 2 times N */ double twoM; /* 2 times M */ double scale; /* 2/square_root(MN) */ twoN=2.0*N; twoM=2.0*M; scale=(2.0/(sqrt((double)(M*N)))); for(u=0; u