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 Reply-To: From: "Rahul" To: Subject: problem with cygwin version 1.3.4 cross compilation using gcc Date: Sat, 1 Dec 2001 15:07:51 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Hi, I am using cygwin version 1.3.4. gcc version 2.95.3-5 (cygwin special) on Windows 2000, build 2195 SP 2. I was trying to see how cross compilation works on windows so I wrote this small code for creating directory /var/testinstall/testcygwin. To compile it I used following syntax $ gcc -o testinstall.exe testinstall.cpp I did not use any other make or link commands. The testinstall.exe along with cygwin1.dll is working fine on the machine where I compiled it. It creates all the proper directories But when I copy same two files (my exe and cygwin1.dll) on another Windows 2000 machine, this program is always giving same message "error occurred creating /var/testinstall". It appears that Unix to Windows directory name conversion is not taking place even though cygwin1.dll is present. I have no idea why it is not running on other machine, while same program is running on this machine where I am compiling it. Am I missing something ? Do I need to do something different while compiling ? Do I need to set PATH variable on another machine ? I have tried looking at cygwin FAQ, User Manual and then turned to this group. *** MY program **** #include #include char tempdirname[216]; main() { int status; try { (void) printf("\n* Directory creation started\n*"); (void) sprintf(tempdirname,"C:/cygwin"); (void) printf("now creating %s directory\n", tempdirname); if((status=mkdir(tempdirname,0777)) != 0) printf("%s directory allready exists\n", tempdirname); (void) sprintf(tempdirname,"C:/cygwin/var"); (void) printf("now creating %s directory\n", tempdirname); if((mkdir(tempdirname,0777)) != 0) printf("%s directory allready exists\n", tempdirname); (void) sprintf(tempdirname,"/var/testinstall"); (void) printf("now creating %s directory\n", tempdirname); if((mkdir(tempdirname,0777)) != 0) throw -1; (void) sprintf(tempdirname,"/var/testinstall/testcygwin"); (void) printf("now creating %s directory\n", tempdirname); if((mkdir(tempdirname,0777)) != 0) throw -1; exit(0); } catch(int error) { if(error == -1) printf("error occured creating %s directory, fix it and run install again\n", tempdirname); exit(0); } } I appreciate your guidence and thanks in advance. Rahul _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/