Re: problems with installing cygwin on windows 7
On Thu, May 2, 2013 at 11:25 PM, Piotr Cieplak piotr_ciep...@yahoo.com wrote: Could anyone help me with this problem? I posted this couple of days ago, but so far there is no response. When installing cygwin using default option - everything goes well. On the other hand when trying to install: everything (install option) or some parts of the cygwin package the setup.exe runs for ever and could not complete successfully within 3-5 hours. So I stopped it manually. I tried to do that using various download sites and it does not help. I am trying to install cygwin as a first package on freshly installed windows 7. Is anyone experiencing similar problems? What the remedy could be? Thanks in advance Piotr Hi Piotr, I have installed reinstalled Cygwin recently (and over the past 12 years). If you got the default version of Cygwin to install correctly, there is no problem with your computer, etc. A full install might take 12 hours, so be patient. Also, I have found that the kernel.org mirror is much faster than the anl.gov mirror I had previously used. A faster option might to use 2-3 steps: 1. Do a full download and save but don't install. 2. Do a basic (default) install from the saved files. This helps to verify that the download worked without any glitches (the connection from the mirror through the internet, your ISP, the Setup.exe program and your computer aren't perfect...sometimes things get garbled). 3. Do a few quick tests to see that the basic install worked (open a shell window and run ls -l, etc). Assuming that works, re-run Setup.exe and select a few more individual packages for a full install (maybe compilers, editors, etc). Even with just a few things, the postinstall scripts can still take a couple of hours to finish things off, so be prepared and don't kill them before they're finished. Repeat as necessary until everything you actually use is installed. If something goes wrong, you still have the saved download and don't need to repeat step #1. Just delete the c:/cygwin dir and start over at step 2. Enjoy! And thank you once again to the entire Cygwin team for helping those of us who are still stuck interacting with Windoze. ;) Alan Thompson P.S. I have had to run rebaseall each time I do an install or upgrade over the past year.not sure why as this never used to be a problem. Please see: http://cygwin.wikia.com/wiki/Rebaseall It is only a 5 minute process once you have the correct instructions. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: problems with installing cygwin on windows 7
On Fri, May 3, 2013 at 12:03 PM, Ryan Johnson ryan.john...@cs.utoronto.ca wrote: On 03/05/2013 2:28 PM, Alan Thompson wrote: P.S. I have had to run rebaseall each time I do an install or upgrade over the past year.not sure why as this never used to be a problem. That's very strange, because setup.exe started running rebaseall automatically just over a year ago [1]. You shouldn't need to run rebaseall these days unless you compile your own .dlls and want them to play nice with the rest of the system. snip ... but at least it doesn't tell you to reboot into safe mode as part of using Cygwin. I did not boot into safe mode - just a plain reboot as a safety precaution. I then just opened up a regular Windoze cmd.exe window and typed the commands using the dash shell. I cannot explain why I have suddenly needed to run rebaseall to keep Cygwin working, especially since I had thougt that setup.exe handled everything as you state. Last month the corp. IT dept did a windows update and Cygwin quite working. I did a Cygwin reinstall but got the error message (can't remember specifically now) indicating a rebaseall was needed. Rediscovered the rebaseall documentation via google and printed it out to keep at my desk. Fortunately, the simple rebaseall command got the Cygwin installation back up and working smoothly in just a few minutes. Alan Thompson On Fri, May 3, 2013 at 12:03 PM, Ryan Johnson ryan.john...@cs.utoronto.ca wrote: On 03/05/2013 2:28 PM, Alan Thompson wrote: P.S. I have had to run rebaseall each time I do an install or upgrade over the past year.not sure why as this never used to be a problem. That's very strange, because setup.exe started running rebaseall automatically just over a year ago [1]. You shouldn't need to run rebaseall these days unless you compile your own .dlls and want them to play nice with the rest of the system. Please see: http://cygwin.wikia.com/wiki/Rebaseall It is only a 5 minute process once you have the correct instructions. Where correct means accurate and up to date?*** Please don't use those instructions, even if they are a the very top of the Google listing for cygwin setup rebaseall. First, rebaseall runs automatically as part of setup for over a year now [1]. Second, rebooting into safe mode to stop cygwin services borders on downright silly. Third, you don't need to be Administrator to run rebase unless you messed with file permissions in really weird ways. Fourth, somebody *is* working on a 64-bit port of cygwin; it mostly works at this point, and somebody posted about using it just today in fact [2]. [1] http://cygwin.com/ml/cygwin-announce/2012-03/msg00060.html [2] http://cygwin.com/ml/cygwin/2013-05/msg00055.html *** but then again, the official documentation at /usr/share/doc/rebase/README still says: Note that rebaseall is only a stop-gap measure. Eventually the rebase functionality will be added to Cygwin's setup.exe, so that rebasing will happen automatically. ... but at least it doesn't tell you to reboot into safe mode as part of using Cygwin. Ryan -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Is there a source of moderately random data with good speed in Cygwin?
On Wed, Feb 27, 2013 at 7:33 AM, Adam Dinwoodie adam.dinwoo...@metaswitch.com wrote: Andrey Repin wrote: I was need to pipe some bytes through application and watch it's reaction. But with /dev/urandom the stream speed is only about 40Mb/sec. Using /dev/zero, however, makes it 3 orders of magnitude faster (~35Gb/s), but for technical reasons, using monotonous sequence is highly undesirable. Is there any more performant source of non-monotonous byte sequences available to Cygwin? I would be pretty happy even with sequential bytes, I think. Only two reservations are good performance (something around 100 Mb/sec or more would suffice) and a degree of randomness. You could also copy one of the simple random number generators from http://en.wikipedia.org/wiki/Linear_congruential_generator. For example, a simple one is x(n+1) = (1664525 * x(n) + 1013904223) mod 2^32 Alan Thompson -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Problem with Cygwin 1.7.17 + Bash and Grep...
Never heard of pspad, but I use Cygwin's dos2unix all the time for this kind of thing. Alan Thompson On Tue, Feb 5, 2013 at 6:49 AM, Gates, Roger roger.ga...@goodrich.com wrote: I'm essentially trying to take the contents of one file, and use it as input for a grep command against another file, but I do not get any results, even though I know the 2nd file contains a match. In the one-liner below, I include an echo to confirm the output is in the variable that should be used with the grep command. [vmorales@D630-Vmorales ~]# for i in `cat file-a.txt`; do echo $i; grep $i file-b.txt; done alpha beta charlie delta echo [vmorales@D630-Vmorales ~]# grep charlie file-b.txt charlie,13 File-a.txt must be in DOS format. Try this. for i in `cat file-a.txt | d2u`; do echo $i; grep $i file-b.txt; done alpha beta charlie charlie,13 delta echo Roger -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Problems with permissions after installing cygwin without admin privileges
Hi - I'm not sure if this will help your problem, but in the past I have had to install Cygwin to a number of non-networked machines. For me, the easiest way was to use setup.exe with the option of save files but don't install. You can copy the saved folder and setup.exe onto a CD and take it to each installation target machine in turn. This eliminates any hassle with network permissions/visibility/latency during the install, which can save headaches. Since you seem to have gotten the first level of Cygwin installed over the network, this may not be your problem but it might be worth a try. Alan Thompson On Fri, Jan 25, 2013 at 7:01 AM, Alan alan.curt...@gmail.com wrote: I have downloaded and installed cygwin on one machine and would like to install it on a second machine which is non-networked and for which I don't have administrator rights. However, I am running into some issues which are described below. I have created a Mapped Network Drive (X:) for the folder I wish to install cygwin into, for which I have full access. I have copied the installer and local package directory from the first machine to the second. I changed the name of the cygwin installer to cygwin.exe and have run it as the non-administrator. I have selected the option install from Local Directory. I have selected x:\cygwin as the root install directory and Install for Just Me. I selected the copied local package directory. I selected the basic install with no additional packages. cygwin seems to install with no warnings or error, except no Desktop icon is created. The cygwin terminal starts with no problem. The first problem comes when I try to install the rxvt package. Running the installer again with that package selected results in an error. Package: rxvt rxvt.sh exit code 3 Running /etc/postinstall/rxvt.sh from the terminal gives these messages. Using the default version of /etc/X11/app-defaults/Rxvt (/etc/defaults/etc/X11/app-defaults/Rxvt) /bin/touch: cannot touch `/etc/X11/app-defaults/Rxvt': No such file or directory /bin/cp: cannot create regular file `/etc/X11/app-defaults/Rxvt': No such file o r directory /usr/bin/mkdir: cannot create directory `/cygdrive/c/Documents and Settings/All Users/Start Menu/Programs/Cygwin': Permission denied mkshortcut: Saving C:\Documents and Settings\All Users\Start Menu\Programs\Cygw in\rxvt-native.lnk failed; does the target directory exist? mkshortcut: Saving C:\Documents and Settings\All Users\Start Menu\Programs\Cygw in\rxvt-x.lnk failed; does the target directory exist? I am guessing the problem is I don't have permission to write to the folder C:\Documents and Settings\All Users\Start Menu\Programs\Cygw in\rxvt- x.lnk and will have to make the rxvt links by hand. That problem seems solvable with some work. But is there a way to solve this without hand tweaking? The second problem I is I'd like to now install texlive. I have re-run the installer selecting the package texlive-collection-latex. After several minutes, the installer now reports Package: fontconfig fontconfig.sh exit code 13 Package: texlive-collection-basic texlive-collection-basic.sh exit code 11 Package: Unknown package rxvt.sh exit code 3 and typing latex in the cygwin terminal returns -bash: /usr/bin/latex: cannot execute binary file I find I cannot change the permissions on /usr/bin/latex with chmod (drive is NTFS) How do I fix this? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Cygwin gvim needs weird ritual to past from Windows clipboard
On Wed, Jan 23, 2013 at 11:58 PM, Andy andymhanc...@gmail.com wrote: Guys, thanks for your replies. I might not have been clear enough in my original post, but the problem is in attempting to copy from a Windows app and pasting into Cygwin's gvim. Correct me if I'm wrong, but your responses (and the wiki site) are directed at copying from gvim to Windows. I'm pretty sure I tried Shift-Insert, and that didn't solve the problem. To be sure, the problem isn't *always* present, but it is usually present. When it is, nothing I've tried will fix it except the trick of highlighting arbitrary text in gvim before trying to copy something from a Windows app. About PC-based gvim, I also have that. But I tend to use the gvim text buffer as a bash command console, concocting bash code on the fly and either shelling out to generate/filter text or writing some lines to !bash. It's tricky to set up vimrc so that PC-based gvim can do this, though I think I've mostly got that problem solved. Just as vexing, however, is the constant need to convert the path to/from bash/cygwin posix form to Windows form. So when I need to bash around, I use the cygwin gvim. Everything I said works both ways, both Cygwin-Windoze and Windoze-Cygwin. The only difference in GVim is whether you use yank (Y) or put (P). This works for both the win32 version of GVim and the Cygwin X11 version of GVim. To be specific: - Highlight something in your browser and type Crtl-C - Go into GVim and type *P (i.e. double quote-asterisk-capital P). GVim sees the windows clipboard as a special buffer named * (i.e. asterisk, star, whatever). The double-quote references a buffer, star is the name of the buffer, and capital P means put contents here. Of course, both yank and put have both uppercase versions (whole lines) and lowercase versions (partial lines). Have you tried this? Alan Thompson -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Cygwin gvim needs weird ritual to past from Windows clipboard
I always use the keyboard shortcuts to cut/paste from windows apps (e.g. Chrome/Firefox, etc). - Highlight the desired text (typically using v or V motion). - Copy using -*-Y (double quote, asterisk, y) to yank into the system clipboard - Paste into the windoze app (browser, etc) using Crtl-V as usual Also, note that for some things I use the Cygwin version of GVim (have to start the X11 server first), and for some things I use the native Windows version of GVim. Alan Thompson On Tue, Jan 22, 2013 at 9:18 AM, Chris Sutcliffe ir0nh...@gmail.com wrote: On 22 January 2013 11:55, Andy wrote: I installed cygwin's gvim on Windows 7. I found that pasting from the Windows clipboard into gvim doesn't work by clicking the middle mouse button unless I go through a weird ritual that I discovered by accident. If I don't do this, I get E353: Nothing in register *. Vim's Wiki has a section dedicated to having Cygwin (G)Vim interact with the Windows clipboard: http://vim.wikia.com/wiki/Using_the_Windows_clipboard_in_Cygwin_Vim There are a few options outlined in there that should help you out. Chris -- Chris Sutcliffe http://emergedesktop.org http://www.google.com/profiles/ir0nh34d -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Fwd: ctags recursion broken? [ATTN: ctags, xemacs-tags maintainers]
The clash involves xemacs. The xemacs maintainer said he would take care of it. You probably missed his reply because the discussion got moved to the cygiwn-apps list: http://cygwin.com/ml/cygwin-apps/2012-12/msg00045.html Ken OK - Thank you for the update. Alan -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: ctags recursion broken? [ATTN: ctags, xemacs-tags maintainers]
Hi - It looks like there has been no movement on this bug for a month. What is the best way to contact the emacs maintainers? It does not seem correct for emacs (or xemacs) to overwrite the ctags executable. Alan Thompson On Wed, Dec 12, 2012 at 5:08 AM, Warren Young war...@etr-usa.com wrote: On 12/11/2012 13:05, Thrall, Bryan wrote: Yes, it looks like xemacs-tags and ctags packages both install /usr/bin/ctags.exe: http://cygwin.com/cgi-bin2/package-grep.cgi?grep=ctags.exe Is there an especially good reason xemacs-tags can't depend on ctags, and get its ctags.exe from my package? Or, is there something special about Xemacs ctags that's worth preserving? Or, maybe ctags.exe should just be removed from the Xemacs package. Doesn't Emacs want you to use etags anyway? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: ctags recursion broken?
Hi - As a long-time user of Cygwin and Exuberant ctags, it seems that the current version of ctags on Cygwin is broken. Specifically, /bin/ctags -R . /bin/ctags: skipping .: it is not a regular file. Normally, ctags should recursively descend and process all files from the current directory. I downloaded version 5.8 of Exuberant Ctags from http://ctags.sourceforge.net/ and it works as expected. Upon closer inspection, it appears that Cygwin has a different version of ctags (not Exuberant Ctags!) that does not support recursion at all! Specifically, ctags -V ctags (standalone 21.4.22) Copyright (C) 2007 Free Software Foundation, Inc. This program is distributed under the terms in ETAGS.README ctags --help Usage: ctags [options] [[regex-option ...] file-name] ... These are the options accepted by ctags. You may use unambiguous abbreviations for the long option names. A - as file name means read names from stdin (one per line). Absolute names are stored in the output file as they are. Relative ones are stored relative to the output file's directory. snip -R, --no-regex Don't create tags from regexps for the following files. snip So the -R no longer means recursion, and there is no --recurse option. Given that Exuberant Ctags is distributed under the GPL and is very powerful, it seems that it would be prudent to include it in Cygwin. I could even volunteer to be the package maintainer, if desired. How should we proceed? Thank you, Alan Thompson -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: ctags recursion broken?
Hi - Yes, I'm sure: find /bin -name '*tags*' | xargs ls -ldF -rwxr-xr-x 1 alathompson Domain Users 85504 Jan 31 2009 /bin/ctags.exe* -rwxr-xr-x 1 alathompson Domain Users 83968 Jan 31 2009 /bin/etags.exe* -rwxr-xr-x 1 alathompson Domain Users 5411 Dec 21 2011 /bin/ocamltags* -rwxr-xr-x 1 alathompson Domain Users 68608 Jan 31 2009 /bin/ootags.exe* ls -ldF /bin/ls /bin/vim /bin/gcc lrwxrwxrwx 1 alathompson Domain Users 21 Oct 18 12:20 /bin/gcc - /etc/alternatives/gcc* -rwxr-xr-x 1 alathompson Domain Users 101902 Feb 6 2012 /bin/ls* lrwxrwxrwx 1 alathompson Domain Users 21 Oct 18 12:48 /bin/vim - /etc/alternatives/vim* uname -a CYGWIN_NT-6.1-WOW64 ALAN-THO-LAP 1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin One can see from the timestamp on the links for gcc and vim that I installed Cygwin on 10/18/2012. However, it seems that both ctags and etags are old versions of the program (circa 2007) and are not the Exuberant Ctags version. However, the GNU documentation here: http://directory.fsf.org/wiki/Exuberant_Ctags clearly lists the Exuberant Ctags, although it has only been updated as of 2004. However, looking here: http://cygwin.com/packages/ctags/ctags-5.8-1-src we see that cygwin has Exuberant Ctags 5.8. Perhaps it is just a packaging issue that caused the old one to be present and Exuberant Ctags 5.8 to be not present? You can see from this thread: http://stackoverflow.com/questions/2634001/any-idea-why-ctags-wont-recurse-on-cygwin/13810472#13810472 that I'm not the only one who stumbled onto this problem. Where should we go from here? Could it just be a packaging problem? Alan Thompson On Tue, Dec 11, 2012 at 11:24 AM, Thrall, Bryan bryan.thr...@flightsafety.com wrote: Are you sure you're using the ctags you think you are? $ ctags --help Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert Compiled: Dec 11 2009, 11:42:40 Addresses: dhieb...@users.sourceforge.net, http://ctags.sourceforge.net Optional compiled features: +wildcards, +regex, +internal-sort Usage: ctags [options] [file(s)] snip -R Equivalent to --recurse. snip Hope this helps! -- Bryan Thrall Principal Software Engineer FlightSafety International bryan.thr...@flightsafety.com -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: ctags recursion broken?
Looking at the link on StackOverflow (from 2010) it may be that the xemacs version of ctags is overwriting the default version in /bin. Could this be the culprit? Alan Thompson On Tue, Dec 11, 2012 at 11:55 AM, Alan Thompson thompson2...@gmail.com wrote: Hi - Yes, I'm sure: find /bin -name '*tags*' | xargs ls -ldF -rwxr-xr-x 1 alathompson Domain Users 85504 Jan 31 2009 /bin/ctags.exe* -rwxr-xr-x 1 alathompson Domain Users 83968 Jan 31 2009 /bin/etags.exe* -rwxr-xr-x 1 alathompson Domain Users 5411 Dec 21 2011 /bin/ocamltags* -rwxr-xr-x 1 alathompson Domain Users 68608 Jan 31 2009 /bin/ootags.exe* ls -ldF /bin/ls /bin/vim /bin/gcc lrwxrwxrwx 1 alathompson Domain Users 21 Oct 18 12:20 /bin/gcc - /etc/alternatives/gcc* -rwxr-xr-x 1 alathompson Domain Users 101902 Feb 6 2012 /bin/ls* lrwxrwxrwx 1 alathompson Domain Users 21 Oct 18 12:48 /bin/vim - /etc/alternatives/vim* uname -a CYGWIN_NT-6.1-WOW64 ALAN-THO-LAP 1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin One can see from the timestamp on the links for gcc and vim that I installed Cygwin on 10/18/2012. However, it seems that both ctags and etags are old versions of the program (circa 2007) and are not the Exuberant Ctags version. However, the GNU documentation here: http://directory.fsf.org/wiki/Exuberant_Ctags clearly lists the Exuberant Ctags, although it has only been updated as of 2004. However, looking here: http://cygwin.com/packages/ctags/ctags-5.8-1-src we see that cygwin has Exuberant Ctags 5.8. Perhaps it is just a packaging issue that caused the old one to be present and Exuberant Ctags 5.8 to be not present? You can see from this thread: http://stackoverflow.com/questions/2634001/any-idea-why-ctags-wont-recurse-on-cygwin/13810472#13810472 that I'm not the only one who stumbled onto this problem. Where should we go from here? Could it just be a packaging problem? Alan Thompson On Tue, Dec 11, 2012 at 11:24 AM, Thrall, Bryan bryan.thr...@flightsafety.com wrote: Are you sure you're using the ctags you think you are? $ ctags --help Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert Compiled: Dec 11 2009, 11:42:40 Addresses: dhieb...@users.sourceforge.net, http://ctags.sourceforge.net Optional compiled features: +wildcards, +regex, +internal-sort Usage: ctags [options] [file(s)] snip -R Equivalent to --recurse. snip Hope this helps! -- Bryan Thrall Principal Software Engineer FlightSafety International bryan.thr...@flightsafety.com -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: loading DLLs created with Cygwin into Sun JDK
Check out this solution from the mailing list archives: http://sources.redhat.com/ml/cygwin/2003-06/msg00357.html Alan Thompson At 10:09 PM 7/31/2003 -0600, Marcus G. Daniels wrote: I'm having a problem getting DLLs compiled with Cygwin to load into Sun JDK 1.4.1. In the past this has worked, so I hope this is fixable without too much work. Here's an example. Take a simple Java Native Interface method like this: $ cat jniTest.c void Java_Test_test () { printf (test\n);} And compile it like so: gcc -shared -o jniTest.dll jniTest.c Also needed is the Java-side file: public class Test { public native void test (); public static void main (String args[]) { Test test = new Test (); System.out.println (loading jniTest); System.loadLibrary (jniTest); System.out.println (calling native method); test.test (); System.out.println (success); } } Compiled it like so from a Cygwin terminal (replace /cygdrive/i/j2sdk1.4.1_02 as appropriate): $ /cygdrive/i/j2sdk1.4.1_02/bin/javac Test.java Now run it, you should see it print loading jniTest, but nothing more. $ CLASSPATH=. /cygdrive/i/j2sdk1.4.1_02/bin/java Test In contrast, relink the DLL, but not using -mno-cygwin: $ gcc -mno-cygwin -shared -o jniTest.dll jniTest.c $ CLASSPATH=. /cygdrive/i/j2sdk1.4.1_02/bin/java Test Now it should print: loading jniTest calling native method test success -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: loading DLLs created with Cygwin into Sun JDK
OK - now you have me confusedIf you're not loading DLL's into Java for use with JNI, what are you doing? Also, note that those techniques work for both plain JNI (i.e. java calls into C/C++) as well as the invocation API (where a C/C++ program creates an JVM). At 03:52 PM 8/1/2003 -0600, Marcus G. Daniels wrote: Alan Thompson wrote: Check out this solution from the mailing list archives: http://sources.redhat.com/ml/cygwin/2003-06/msg00357.html Thanks, but I'm not using the JNI Invocation API. Also, the suggestions in that web page refer to using -mno-cygwin. In the past it was actually possible to load Cygwin-based DLLs into Sun JDK.. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: loading DLLs created with Cygwin into Sun JDK
Ok, if you check out this example: http://www.whitecaps.net/jni/expr.jar you'll see that there it doesn't use -mno-cygwin. Here is the g++ task from the ant build script: property name=cppCompilerName value=g++ / echo message=Compiling for Cygwin... / exec executable=${cppCompilerName} dir=${ctmp} arg line=-D_REENTRANT -D_GNU_SOURCE -D__int64='long long' / arg line=-I${env.JAVA_HOME}/include / arg line=-I${env.JAVA_HOME}/include/win32 / arg line=-I${basedir}/src / arg line=-c / arg line= HelloWorld.c / /exec echo message=Linking for Cygwin... / exec executable=${cppCompilerName} dir=${ctmp} arg line= -Wl,--add-stdcall-alias -shared / arg line=-I${env.JAVA_HOME}/include / arg line=-I${env.JAVA_HOME}/include/win32 / arg line=-I${basedir}/src / arg line= / arg line=-o ${bin}/Native.dll / arg line= HelloWorld.o / /exec . target name=go depends=build java classname=HelloWorld classpath=${bin} fork=true jvmarg line=-Xms64m -Xmx256m / jvmarg line=-Djava.library.path=${bin} / /java antcall target=clean / /target Works for me! === ant Buildfile: build.xml . ccComp: [mkdir] Created dir: C:\work\test\expr\jni\hello\ctmp [copy] Copying 2 files to C:\work\test\expr\jni\hello\ctmp [echo] Compiler Name: g++ [echo] Compiler Version: [exec] g++ (GCC) 3.2 20020927 (prerelease) [exec] Copyright (C) 2002 Free Software Foundation, Inc. [exec] This is free software; see the source for copying conditions. There is NO [exec] warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [echo] Compiling for Cygwin... [echo] Linking for Cygwin... go: [java] loading library . [java] answer[ 0 ] = 'Hello World from C!' [java] answer[ 1 ] = 'the new C string value' [java] answer[ 2 ] = 'initial value from java' BUILD SUCCESSFUL Total time: 17 seconds === At 08:59 PM 8/1/2003 -0600, Marcus G. Daniels wrote: Again, those techniques specify use of -mno-cygwin, which worked fine for me in my posted example. The crash happens as the DLL is loaded, not when methods are called. Have you actually tried _not_ using -mno-cygwin? Also, using 'javah' or not to generate the headers (and making sure JNIEXPORT and JNICALL are in the header and implementation declarations, and using and using -Wl,--add-stdcall-alias makes no difference. For this simple test case, you need to have JNIEXPORT/JNICALL and the -Wl,--add-stdcall-alias, or neither to get the test case to work. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: FAQ page margin width issue
At 08:47 PM 8/1/2003 -0400, you wrote: Or don't use IE. ;-) With Mozilla, the line you indicate is the only one that scrolls off the right side of the page. Actually, a quick check of IE 5.5 (yeah, I know it's out of date but I don't use it so I don't care) shows me the same result. I know that doesn't help you much but... I tried Mozilla 1.4 IE 6.0, both render only one line past the visible screen. Don't know what you are looking at. On Netscape 7.02 only 1 line goes past the visible screen...no big problem. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Linking with JNI Invoke Using Cygwin gcc
Hi Tom - There is a quirk when using the JNI Invocation API on Cygwin (non-invocation JNI works as expected). The solution is documented nicely at the excellent JNI-on-Cygwin webpage: http://www.inonit.com/cygwin/. You can also download some sample JNI code, including both invocation- and non-invocation-code at http://www.whitecaps.net/jni/expr.jar. Alan Thompson At 04:21 PM 6/5/2003 -0500, Thomas X. Hoban wrote: I have written a DLL and a test program that uses the JNI api to invoke a JVM. When I try to link with a test program, I get an error indicating that a reference to [EMAIL PROTECTED] is undefined. $ export JAVA_HOME=/cygdrive/c/j2sdk1.4.1_02 $ g++ -c I$JAVA_HOME/include I$JAVA_HOME/include/win32 JavaGateway.c++ $ g++ -I$JAVA_HOME/include I$JAVA_HOME/include/win32 L$JAVA_HOME/lib \ -ljvm JavaGateway.o -o testGateway testGateway.c++ The link command above produces these errors: JavaGateway.o(.text+0x171):JavaGateway.c++: undefined reference to [EMAIL PROTECTED]' JavaGateway.o(.text+0x251):JavaGateway.c++: undefined reference to [EMAIL PROTECTED]' collect2: ld returned 1 exit status I assume that the jvm.lib file provided with the sdk was compiled with MS VC++. Does the cygwin gcc compiler massage the symbol references differently from MS? Does anyone have a suggestion on how I can make this work? Thanks, Tom -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: (Aucun objet)
Hi Jean-Luis, I also do a lot of java work on Cygwin. In addition to the answer Randall gave you, I would also encourage you to use the -classpath argument to the javac and java commands, rather than using the CLASSPATH environment variable. This provides a more solid control the classpath used for any given application and will help to avoid clashes between different java applications (which may expect different classpath's). I typically type the entire java -classpath XXX MyMainClass command into a short C-shell script so I don't need to re-type the command for repeated runs. Good luck! Alan Thompson At 10:58 PM 3/31/2003 -0800, Randall R Schulz wrote: Jean-Luis, Even though you're using CYGWIN, which provides a very Unix-like environment and inside of which the PATH has a Unix-like syntax, the Sun Java compiler is a Windows application and it expects CLASSPATH to be formatted according to the Windows convention. The path components are separated with a semicolon. The path elements themselves, if they're absolute paths, must begin with a driver letter, followed by a colon, followed by an absolute path name. If you construct your CLASSPATH this way, things should work. Randall Schulz At 22:53 2003-03-31, you wrote: Hello I installed java (j2sdk1.4.0) in Windows. In general I work in LInux and I developped an application in JAVA and ANTLR. I installed CYGWIN and I want to complie my JAVA application in WINDOWS, i uses make for manage compilation. I set my PATH variable for JAVA access and this work fine. But when I want set my CLASSPATH variable, I am in trouble. The setting in CYGWIN environnement don't work, JAVA in out CYGWIN. The setting in CYGWIN script (set CLASSPATH=one dir) work but I want manage many dirs : A. If I set many dir in CYGWIN script this don't work B. If I set many dir in CYGWIN envi this don' work Some people have a the same pb ? Can you help me ? Boulanger JL -- 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/ -- 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/
Re: Fw: Please help. gcc 3.2.2 configure problem or what?
Hi - Look here (you probably already have): http://gcc.gnu.org/install/configure.html You are right, I used -program-suffix=-3.2.2. You need to be careful so that it finds only 3.2.2 files. Make sure you modify your path so that all of the 3.2.2 stuff is ahead of the normal stuff (both *.h files and libraries). Do a find /usr -name *3.2.2* -print to see all of the new files you need to be aware of. Once you set up this stuff in your build file (I have been using ant), gcc 3.2.2 works fine. I have been using it for JNI stuffno problems. Since I got this working, I haven't messed with the --prefix option. Alan Thompson At 06:20 AM 3/28/2003 +0100, you wrote: Hi again I build gcc 3.2.2 with the --suffix option (see the gcc readme file) under Cygwin last month and it worked fine. Alan Thompson I think my problem has something to do with mingw32 and windows gui support. I managed to build a gcc 3.2.2 and enable language Ada, c, c++, java, objc and it seems to work. The problem starts when I try to link a program that has a gui. I can't find --suffix option, if you mean --program-suffix option shouldn't my --prefix work simular? -- 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/
Re: Please help. gcc 3.2.2 configure problem or what?
I build gcc 3.2.2 with the --suffix option (see the gcc readme file) under Cygwin last month and it worked fine. Alan Thompson At 11:19 PM 3/27/2003 +0100, Joakim Olsson wrote: Hi I've tried to configure and build gcc 3.2.2 under cygwin. the compiler builds fine but then the problem starts: I've tried to build fltk-1.1.3 (a gui toolkit) when I saw the problem. It seems that there are several unresolved in my new gcc. I looked around and found the actual symbols in libgcc.a in the old gcc that came with cygwin. What have I done wrong? following are output from linking and gcc -v etc: Linking fluid.exe... /usr/lib/mingw/libsupc++.a(new_op.o)(.text$_Znwj+0x98): undefined reference to ` __Unwind_Resume' /usr/lib/mingw/libsupc++.a(new_opv.o)(.text$_Znaj+0x1b): undefined reference to `__Unwind_Resume' /usr/lib/mingw/libsupc++.a(eh_personality.o)(.text$__cxa_call_unexpected+0xe 8): undefined reference to `__Unwind_Resume' /usr/lib/mingw/libsupc++.a(eh_throw.o)(.text$__cxa_throw+0x1b): undefined reference to `___w32_sharedptr_unexpected' /usr/lib/mingw/libsupc++.a(eh_throw.o)(.text$__cxa_throw+0x25): undefined reference to `___w32_sharedptr_terminate' /usr/lib/mingw/libsupc++.a(eh_throw.o)(.text$__cxa_throw+0x54): undefined reference to `__Unwind_RaiseException' /usr/lib/mingw/libsupc++.a(eh_throw.o)(.text$__cxa_rethrow+0x1b): undefined reference to `__Unwind_RaiseException' /usr/lib/mingw/libsupc++.a(eh_terminate.o)(.text$_ZSt9terminatev+0x7): undefined reference to `___w32_sharedptr_terminate' /usr/lib/mingw/libsupc++.a(eh_terminate.o)(.text$_ZSt10unexpectedv+0x7): undefined reference to ___w32_sharedptr_unexpected' /usr/lib/mingw/libsupc++.a(eh_terminate.o)(.text$_ZSt13set_terminatePFvvE+0x 3): undefined reference to `___w32_sharedptr_terminate' /usr/lib/mingw/libsupc++.a(eh_terminate.o)(.text$_ZSt14set_unexpectedPFvvE+0 x3): undefined reference to `___w32_sharedptr_unexpected' collect2: ld returned 1 exit status make[1]: *** [fluid.exe] Error 1 $ gcc -v Reading specs from /usr/local/gcc-3.2.2/lib/gcc-lib/i686-pc-cygwin/3.2.2/specs Configured with: ../gcc-3.2.2/configure --prefix=/usr/local/gcc-3.2.2 --enable-languages=ada, c,c++,f77,java,objc Thread model: single gcc version 3.2.2 $ gcc --version gcc (GCC) 3.2.2 Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I also tried to configure and build gcc-mingw-20020817-5 but it allways fails: ./xgcc -B./ -B/usr/local/gcc-mingw-3.2/mingw32/bin/ -isystem /usr/local/gcc-ming w-3.2/mingw32/include -isystem /usr/local/gcc-mingw-3.2/mingw32/sys-include -O2 -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototype s -i system ./include -I. -I. -I../../gcc-3.2-20020817-1/gcc -I../../gcc-3.2-2002081 7-1/gcc/. -I../../gcc-3.2-20020817-1/gcc/config -I../../gcc-3.2-20020817-1/g cc/. ./include -g0 -finhibit-size-directive -fno-inline-functions -fno-exception s \ -c ../../gcc-3.2-20020817-1/gcc/crtstuff.c -DCRT_BEGIN \ -o crtbegin.o In file included from tconfig.h:16, from ../../gcc-3.2-20020817-1/gcc/crtstuff.c:61: ../../gcc-3.2-20020817-1/gcc/config/i386/cygming.h:31:19: stdio.h: No such file or directory In file included from tconfig.h:16, from ../../gcc-3.2-20020817-1/gcc/crtstuff.c:61: Please help, is there a HOWTO on configure build gcc in Cygwin? best regards /joakim olsson SWEDEN -- 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/ -- 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/
Re: LD_LIBRARY_PATH not accessible through java under cygwin for JNI
Gilles - The following should work for you under Cygwin: HelloWorld.c: - #include iostream using namespace std; #include HelloWorld_jni.h JNIEXPORT void JNICALL Java_HelloWorld_sayHello( JNIEnv *env, jclass c ) { cerr Hello World from C! endl; } HelloWorld.java public class HelloWorld { private static native void sayHello(); public static void main( String[] args ) { System.loadLibrary( Native ); sayHello(); } } go.csh: #!/bin/tcsh -v set nonomatch rm -rf ./bin rm -f Native.dll *.o *.h javac HelloWorld.java javah -classpath . -o HelloWorld_jni.h HelloWorld g++ \ -D_REENTRANT -D_GNU_SOURCE -D__int64='long long' \ -I${JAVA_HOME}/include -I${JAVA_HOME}/include/win32 \ -I. \ -Wl,--add-stdcall-alias -shared -o Native.dll HelloWorld.c java -classpath . -Xmx256m -Djava.library.path=. HelloWorld -- Make the 3 files indicated, type go.csh, and it should work. This assumes you have java (I use java 1.4.1) installed on your machine, and that the environment variable JAVA_HOME is set to point to it (e.g. setenv JAVA_HOME c:/j2sdk1.4.1 or similar). You should also checkout the excellent webpage on using JNI with Cygwin at: http://www.inonit.com/cygwin/ Alan Thompson At 12:28 PM 2/27/2003 +0100, you wrote: hi folks, I am currently using my JNI so/dll library under solaris, linux and cygwin. with solaris and linux, no problem, I bind to it using load(..) since the LD_LIBRARY_PATH is set. BUT, under cygwin/windows, it does not work and I shall tell the absolute path when I load the library. I hav already posted in java.machine, but Randall schulz told me to try in this mailing list. thanks for help gilles -- 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/
Re: Cygwin GCC JNI??
Jim - Try the following solution. it worked for me. Write back if it doesn't work and I'll generate a more explicit example from my ant build script. Alan Thompson From: Mike Bresnahan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Using cygwin and JAVA/JNI Date: Wed, 5 Feb 2003 22:52:17 -0800 Importance: Normal I have been using Cygwin GCC 3.2 to build JNI DLLs that use iostream without difficulty. I have done the following things: - put -mno-cygwin -D_REENTRANT -D_GNU_SOURCE -D__int64=long long on the compiler command line - put -mno-cygwin -Wl,--add-stdcall-alias on the linker command line See the Cygwin FAQ at http://cygwin.com/faq/faq.html for info on -mno-cygwin. Mike Bresnahan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Alan Thompson Sent: Wednesday, February 05, 2003 8:18 PM To: [EMAIL PROTECTED] Subject: Using cygwin and JAVA/JNI Hi all - I have been doing some JNI stuff to integrate our legacy software, and I have had very good luck following the examples at http://www.inonit.com/cygwin/jni/helloWorld/ . The only twist is that I've been using g++ instead of gcc, which simplifies the non-java part. Here's a question, though: I cannot for the life of me figure out how to use the C++ iostream in any of the code! For some reason, the -mno-cygwin flag kills the ability of g++ to either compile or link any code referring to iostream. This means one is stuck using good old printf(), instead of the more modern way. No matter how I break up the complies, it still fails at the linking stage (when -mno-cygwin is still required, according to my experiments). Does anyone have any ideas? Also, I've been unable to find any documentation on the -mno-cygwin flag in the gcc/g++ man pages. Can anyone point me to where this comes from and/or is documented? Thanks again for all of the help, Alan Thompson P.S. I've been using Cygwin for quite a while now ant it's fantastic when you're chained to a windoze machine At 02:24 PM 2/17/2003 -0500, Jim Marshall wrote: Sorry if this is a dup, I hit send on the previous message too soon... Hello, First, I'm fairly new to gcc so if this isn't the right list plese direct me to the correct one. I have some code which compiles a shared object, it compiles fine on Red Hat 8 and even on Solaris for Intel. I'm now attempting to compile this same code of Windows XP using Cygwin. This shared object calls functions in the java VM (jvm.dll on windows). When I compile on Windows I get an error stating that it can't find the function JNI_GetCreatedVms function. I'm sure that has to do with the way the jvm.dll is compiled n windows and the calling convention, but I can;t figure it out. I've looked for the past two days and havn't found that much. can anyone lend me a helping hand? I have search teh web and found several sources of info (inonit.com etc..) but none have solved my problem. I'm using g++ 3.2 20020927 (prerelease) which came with cygwin (I downloaded cygwin last week). Here is the command I am passing to g++ ad the output: g++ -Wl,--add-stdcall-alias -mno-cygwin -I. -I../common -Ic:/cygwin/usr/java/include -Ic:/cygwin/usr/java/include/win32 -shared -o Tool.dll Tool.cpp -Lc:/cygwin/usr/java/lib -ljvm /cygdrive/c/temp/ccDembDG.o(.text+0x1dac):Tool.cpp: undefined reference to `_ imp__JNI_GetCreatedJavaVMs@12' /cygdrive/c/temp/ccDembDG.o(.text+0x1e23):Tool.cpp: undefined reference to `_ imp__JNI_GetCreatedJavaVMs@12' make: *** [NPITool.dll] Error 1 I needthe DLL to compile with no dependency on cygwin, hence the -mno-cygwin. The -Wl,--add-stdcall-alias is something I just added after reading information at http://www.inonit.com/cygwin/jni/invocationApi/execute.html before it was just -Wall. Thank you -Jim -- 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/
Re: Interest in gcc 3.2.2?
As luck would have it, the progam I'm working on has multiple threads (in the Java code). I haven't stress tested it with 3.2.2, but the normal test run worked fine. Here is a quick grep on Thread in my code: find src -name *.java | xargs grep Thread src/jxda/PublisherImpl.java:Thread.sleep( 500 ); // milliseconds src/jxda/PublisherImpl.java: new Thread( new Worker(), Worker.class.getName() ).start(); src/jxda/PublisherImpl.java: new Thread( runnable ).start(); src/jxda/PublisherImpl.java:try { Thread.sleep( 2 * 1000 ); } catch ( Exception ex ) {} src/jxda/PublisherImpl.java:new Thread( runnable ).start(); Alan Thompson At 07:31 AM 2/12/2003 +0100, Bart Lamot wrote: Alan, Do you have threads working? I can't get them to work if i compile a java program that has a Thread object it does compile but at runtime i get the error that threads ain't implemented Grtz, Bart *** REPLY SEPARATOR *** On 11-2-2003 at 21:27 Alan Thompson wrote: Hi all - I downloaded gcc 3.2.2 sources, compiled, and got it working on Cygwin. However, I am concerned if I might later encounter any clashes with /usr/lib/mingw, since I overwrote some of the lib*.a files there. Are there any problems with this? The cygwin setup seems a little different than the standard gcc install setup. Is there any interest in bumping the standard cygwin gcc to 3.2.2? Running gcc --version produces gcc (GCC) 3.2 20020927 (prerelease). Is there much difference between this version and gcc 3.2.2? Alan Thompson P.S. I got the JNI and iostream stuff working both both the 3.2 and 3.2.2 versions. I can provide details if anyone is interested. -- 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/ -- 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/ -- 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/
Re: Interest in gcc 3.2.2?
P.S. I'm using Java 1.4.1 from Sun. Alan At 07:31 AM 2/12/2003 +0100, Bart Lamot wrote: Alan, Do you have threads working? I can't get them to work if i compile a java program that has a Thread object it does compile but at runtime i get the error that threads ain't implemented Grtz, Bart *** REPLY SEPARATOR *** On 11-2-2003 at 21:27 Alan Thompson wrote: Hi all - I downloaded gcc 3.2.2 sources, compiled, and got it working on Cygwin. However, I am concerned if I might later encounter any clashes with /usr/lib/mingw, since I overwrote some of the lib*.a files there. Are there any problems with this? The cygwin setup seems a little different than the standard gcc install setup. Is there any interest in bumping the standard cygwin gcc to 3.2.2? Running gcc --version produces gcc (GCC) 3.2 20020927 (prerelease). Is there much difference between this version and gcc 3.2.2? Alan Thompson P.S. I got the JNI and iostream stuff working both both the 3.2 and 3.2.2 versions. I can provide details if anyone is interested. -- 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/ -- 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/ -- 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/
Using cygwin and JAVA/JNI
Hi all - I have been doing some JNI stuff to integrate our legacy software, and I have had very good luck following the examples at http://www.inonit.com/cygwin/jni/helloWorld/ . The only twist is that I've been using g++ instead of gcc, which simplifies the non-java part. Here's a question, though: I cannot for the life of me figure out how to use the C++ iostream in any of the code! For some reason, the -mno-cygwin flag kills the ability of g++ to either compile or link any code referring to iostream. This means one is stuck using good old printf(), instead of the more modern way. No matter how I break up the complies, it still fails at the linking stage (when -mno-cygwin is still required, according to my experiments). Does anyone have any ideas? Also, I've been unable to find any documentation on the -mno-cygwin flag in the gcc/g++ man pages. Can anyone point me to where this comes from and/or is documented? Thanks again for all of the help, Alan Thompson P.S. I've been using Cygwin for quite a while now ant it's fantastic when you're chained to a windoze machine -- 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/