Re: using fortran common block from dll created by gfortran
Thanks for the notes. I guess the first thing I'm trying to figure out is: - is my test example usage [with sources, compile commands embeded in the test script posted earlier] incorrect usage of fortran common blocks via dll [if so - whats the correct usage?] '!GCC$ ATTRIBUTES DLLEXPORT' syntax gives compile errors. - is it a bug in cygwin/gfortran? Since stuff other than 'fortran comon block' appears to work [fortran routines, c routines, c-globals etc - without requiring any dllimport/export qualifies in code] - this usage unsupported by cygwin/gfortran? [if so - I should either figure out workarrounds - or not use dlls for this usage] More comments below.. On Wed, 24 Jun 2015, LMH wrote: > If you having trouble communicating with the dll, Its more about 'common block variables' in user code have different adresses than those in the dll [when I expect them to be the same] > it might make more > sense to create a generic c dll and embed the fortran in the c dll as a > subroutine. > It is generally not a problem to call a fortran subroutine > from c code though there are some syntax specifics to follow. We do have c/fortran (user) -> c (.a/.so) -> fortran (.a/.so) wroking fine [on most OSes/compilers]. > Your > communication with the dll could follow standard c protocols. Since c > code and fortran code will have their own namespaces, your fortran > includes, common block, etc, shouldn't be a problem since those > variables will only be linked to the fortran objects. Your fortran src > files will be run through the fortran pre-processor so your common block > should be fine. Your c src files will be run through the c > pre-processor. The c objects won't know anything about the fortran > global variables but you can exchange what you need to between the c and > fortran in the call to the fortran subroutine. Yes - we have this - and it works fine. > You end up with two > copies of allot of things but this is a decent way to get fotrran code > to talk to the modern programming world. > > The only way I know to use the same memory namespace for both c and > fortran files is to run the fortran through the c pre-processor (name > your fortran src files .FPP). This lets you use c style includes and > compiler directives in your fortran code but does not support a common > block. You would have to declare global variables in c style includes. Sorry - I don't know what 'same memory namespace' here means.. The test code I posted is just a way to demonstrate the problem and not an exact representative of the 'fortran(user) -> c(library)' interface. thanks, Satish > > LMH > > > Satish Balay wrote: > > Thanks for the note. > > > > I had previously tried something similar - using the directives from > > http://gcc.gnu.org/onlinedocs/gfortran/GNU-Fortran-Compiler-Directives.html > > > > However - I get errros. > > > >>> > > balay@ps4 ~/junk > > $ cat cb_func.f > > subroutine cb_func() > > !GCC$ ATTRIBUTES DLLEXPORT :: cb_func, /cb/ > > common /cb/ cvar > > integer cvar > > cvar = 2 > > end > > > > balay@ps4 ~/junk > > $ gfortran -c cb_func.f > > cb_func.f:2.40: > > > > *GCC$ ATTRIBUTES DLLEXPORT :: cb_func, /cb/ > > 1 > > Error: Invalid character in name at (1) > > > > balay@ps4 ~/junk > > $ > > < > > > > Wrt 'common blocks' vs 'module' - this usage is part of a c library > > supporting fortran interfaces [and works generally on various OSes, > > compilers]. We haven't worked with dlls on windows much. However this > > issue came up on such an attempt with cgwin/gnu compilers. > > > > PS: I'm not subscribed to the ML - it would be great if I'm included in cc: > > > > Thanks, > > Satish > > > > > Hi, > > > > while this is not directly related to gfortran on Cygwin, this article > > might help you appreciate the issues involved: > > https://software.intel.com/en-us/node/535307 > > > > Are you bound to common blocks? If not, you may get better results > > when you put the data in a module. > > > > Regards, > > > > Arjen > > > > On Tue, 23 Jun 2015, Satish Balay wrote: > > > >> Hi Cygwin, > >> > >> I'm debuging an issue with dlls with cygwin gnu compilers - and have > >> narrowed down the issue to the attached test case [script]. > >> > >> Could you guide me to correct usage of 'fortran common block' with dlls? > >> > >> [In this example - using fortran 'common block' via static library > >> works. However the same code using a .dll fails] > >> > >> Thanks, > >> Satish > >> > >> - > >> > >> balay@ps4 ~/junk > >> $ ./cb_test.sh > >> + cat > >> + cat > >> + rm -f '*.o' '*.dll' '*.a' '*.exe' > >> + gfortran -c cb_func.f cb_main.f > >> + ar cr libcb_static.a cb_func.o > >> + gfortran cb_main.o -L. -lcb_static -o cb_main_static > >> + gfortran -shared -o libcb_dynamic.dll cb_func.o > >> + gfortran cb_main.o -L. -lcb_dynamic -o cb_main_dynamic > >> +
Re: using fortran common block from dll created by gfortran
If you having trouble communicating with the dll, it might make more sense to create a generic c dll and embed the fortran in the c dll as a subroutine. It is generally not a problem to call a fortran subroutine from c code though there are some syntax specifics to follow. Your communication with the dll could follow standard c protocols. Since c code and fortran code will have their own namespaces, your fortran includes, common block, etc, shouldn't be a problem since those variables will only be linked to the fortran objects. Your fortran src files will be run through the fortran pre-processor so your common block should be fine. Your c src files will be run through the c pre-processor. The c objects won't know anything about the fortran global variables but you can exchange what you need to between the c and fortran in the call to the fortran subroutine. You end up with two copies of allot of things but this is a decent way to get fotrran code to talk to the modern programming world. The only way I know to use the same memory namespace for both c and fortran files is to run the fortran through the c pre-processor (name your fortran src files .FPP). This lets you use c style includes and compiler directives in your fortran code but does not support a common block. You would have to declare global variables in c style includes. LMH Satish Balay wrote: > Thanks for the note. > > I had previously tried something similar - using the directives from > http://gcc.gnu.org/onlinedocs/gfortran/GNU-Fortran-Compiler-Directives.html > > However - I get errros. > >>> > balay@ps4 ~/junk > $ cat cb_func.f > subroutine cb_func() > !GCC$ ATTRIBUTES DLLEXPORT :: cb_func, /cb/ > common /cb/ cvar > integer cvar > cvar = 2 > end > > balay@ps4 ~/junk > $ gfortran -c cb_func.f > cb_func.f:2.40: > > *GCC$ ATTRIBUTES DLLEXPORT :: cb_func, /cb/ > 1 > Error: Invalid character in name at (1) > > balay@ps4 ~/junk > $ > < > > Wrt 'common blocks' vs 'module' - this usage is part of a c library > supporting fortran interfaces [and works generally on various OSes, > compilers]. We haven't worked with dlls on windows much. However this > issue came up on such an attempt with cgwin/gnu compilers. > > PS: I'm not subscribed to the ML - it would be great if I'm included in cc: > > Thanks, > Satish > > Hi, > > while this is not directly related to gfortran on Cygwin, this article > might help you appreciate the issues involved: > https://software.intel.com/en-us/node/535307 > > Are you bound to common blocks? If not, you may get better results > when you put the data in a module. > > Regards, > > Arjen > > On Tue, 23 Jun 2015, Satish Balay wrote: > >> Hi Cygwin, >> >> I'm debuging an issue with dlls with cygwin gnu compilers - and have >> narrowed down the issue to the attached test case [script]. >> >> Could you guide me to correct usage of 'fortran common block' with dlls? >> >> [In this example - using fortran 'common block' via static library >> works. However the same code using a .dll fails] >> >> Thanks, >> Satish >> >> - >> >> balay@ps4 ~/junk >> $ ./cb_test.sh >> + cat >> + cat >> + rm -f '*.o' '*.dll' '*.a' '*.exe' >> + gfortran -c cb_func.f cb_main.f >> + ar cr libcb_static.a cb_func.o >> + gfortran cb_main.o -L. -lcb_static -o cb_main_static >> + gfortran -shared -o libcb_dynamic.dll cb_func.o >> + gfortran cb_main.o -L. -lcb_dynamic -o cb_main_dynamic >> + ./cb_main_static >> GOOD COMMON BLOCK >> + ./cb_main_dynamic >> BAD COMMON BLOCK >> >> >> balay@ps4 ~/junk >> $ uname -a >> CYGWIN_NT-6.1 ps4 2.0.4(0.287/5/3) 2015-06-09 12:22 x86_64 Cygwin >> >> balay@ps4 ~/junk >> $ gfortran --version >> GNU Fortran (GCC) 4.9.2 > > > -- > 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: Uses of Cygwin
Greetings, Alvin Oo! As much as I despise people, who can't do their homework... Here's some obvious answers. > 1) does it support ruby,python,c++,c, java? From the http://cygwin.com/index.html [1]: Cygwin is: a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows. a DLL (cygwin1.dll) which provides substantial POSIX API functionality. This concludes the scope of Cygwin as: 1. A toolset of familiar GNU utilities. Which inevitable includes GNU C/C++ as the de facto standard compiler. 2. An API compatibility layer. For the rest, use package search or browse through packages available in setup.exe. > 2) What type of shell does it support? (sh,ksh), Use package search, as Warren Young suggested. sh is a nobrainer, as it is mandated by POSIX. Even though the default shell is bash, there's also a more POSIX'y dash available in a base distribution. > what can it emulate? Cygwin is not an emulation engine. Your question makes no sense. > 3) Is it possible for cygwin to start in a certain folder, akin to when I > drop cmd.exe on a certain folder, May be you spelled it backward. I'll give you a credit of doubt. > or name powershell to start in a certain > folder it will open up, i need to navigate to directory fast There's, like, a truckload and a small cart of ways to achieve such effect. If you browse through mail archives, you can easily find tools like "bash here", with various degree of functionality. One of such tools even available in setup. > 4) What are the alternatives to cygwin, what are the advantage and > disadvantage of cgywin? That depends on the level of alteration you have in mind. Flat out of the door, there's no other POSIX API compatibility projects available at all, so, there's no alternatives to the main part of Cygwin - an API compatibility DLL. > 5) What are the most common uses of cgywin? What is the most common use of a POSIX toolset? I don't know how to answer your question without feeling myself stupid. -- With best regards, Andrey Repin Wednesday, June 24, 2015 19:50:00 Sorry for my terrible english...
Re: Uses of Cygwin
To answer the question about Java, there is no "cygwin Java". You simply install the regular Java for Windows. You can invoke it from cygwin, since cygwin happily runs Windows executables. The one thing this does not accomplish is to give you Unix syntax for the Java command line -- you have to use Windows syntax for things like the class path (; not : for separator; full path name looks like C:\dir1\dir2\...\file.ext, etc.). This is because porting something to cygwin involves compiling from source. Also, something as subtle and complex as a Java virtual machine may really need to know that it's Windows underneath, etc. In other words, you really are better off using the Windows version of Java on Windows, even if you use cygwin primarily. Regards -- Eliot Moss -- 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
Cygwin "cp" changes ACLs on files accessed via CIFS
Hello, I am running an OpenIndiana server exporting a ZFS share over CIFS to a number of Windows 7 clients. I have a folder on the share with these ACLs: A:fi:OWNER@:rwaDdtTnNcoy A:dg:Domain us...@domain.com:rwaDdxtTnNcoy A:fig:Domain us...@domain.com:rwaDdtTnNcoy A:fig:GROUP@:rtncy A::OWNER@:rwaxtTnNcCoy A:g:GROUP@:rwaxtncy A::EVERYONE@:tncy I have two files in this folder with the following ACLs set on them: file1.txt: A:g:Domain us...@domain.com:rwadtTnNcoy A::OWNER@:rwatTnNcCoy A:g:GROUP@:rwatncy A::EVERYONE@:tncy file2.txt: A:g:Domain Users@domain:rwadtTnNcoy A::OWNER@:rwatTnNcCoy A:g:GROUP@:rwatncy A::EVERYONE@:tncy >From a Windows 7 client, if I use cygwin's version of cp to copy these files into a subdirectory, the permissions change: mkdir subdir1 cp file*.txt subdir1 subdir1/file1.txt: A::amar...@domain.com:rwadtTnNcCoy A:g:Domain us...@domain.com:rtncy A::OWNER@:rwatTnNcCoy A:g:GROUP@:rtncy A::EVERYONE@:tncy subdir1/file2.txt: D::OWNER@:r D::amar...@domain.com:r A::amar...@domain.com:dtTcCoy A:g:Domain us...@domain.com:rtncy A::OWNER@:watTnNcCoy A:g:GROUP@:rtncy A::EVERYONE@:tncy Performing the same operation from Windows Explorer or using the GnuWin32 version of cp preserves the correct permissions. Has anyone observed this incorrect behavior when using cygwin cp, or do you have any ideas on how to fix this problem? I have also tried "cp -p" as well as "cp --no-preserve=all" but the problem still exists. Thanks, Andrew Martin cygcheck.out Description: Binary data -- 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: using fortran common block from dll created by gfortran
Thanks for the note. I had previously tried something similar - using the directives from http://gcc.gnu.org/onlinedocs/gfortran/GNU-Fortran-Compiler-Directives.html However - I get errros. >> balay@ps4 ~/junk $ cat cb_func.f subroutine cb_func() !GCC$ ATTRIBUTES DLLEXPORT :: cb_func, /cb/ common /cb/ cvar integer cvar cvar = 2 end balay@ps4 ~/junk $ gfortran -c cb_func.f cb_func.f:2.40: *GCC$ ATTRIBUTES DLLEXPORT :: cb_func, /cb/ 1 Error: Invalid character in name at (1) balay@ps4 ~/junk $ < Wrt 'common blocks' vs 'module' - this usage is part of a c library supporting fortran interfaces [and works generally on various OSes, compilers]. We haven't worked with dlls on windows much. However this issue came up on such an attempt with cgwin/gnu compilers. PS: I'm not subscribed to the ML - it would be great if I'm included in cc: Thanks, Satish >>> Hi, while this is not directly related to gfortran on Cygwin, this article might help you appreciate the issues involved: https://software.intel.com/en-us/node/535307 Are you bound to common blocks? If not, you may get better results when you put the data in a module. Regards, Arjen On Tue, 23 Jun 2015, Satish Balay wrote: > Hi Cygwin, > > I'm debuging an issue with dlls with cygwin gnu compilers - and have > narrowed down the issue to the attached test case [script]. > > Could you guide me to correct usage of 'fortran common block' with dlls? > > [In this example - using fortran 'common block' via static library > works. However the same code using a .dll fails] > > Thanks, > Satish > > - > > balay@ps4 ~/junk > $ ./cb_test.sh > + cat > + cat > + rm -f '*.o' '*.dll' '*.a' '*.exe' > + gfortran -c cb_func.f cb_main.f > + ar cr libcb_static.a cb_func.o > + gfortran cb_main.o -L. -lcb_static -o cb_main_static > + gfortran -shared -o libcb_dynamic.dll cb_func.o > + gfortran cb_main.o -L. -lcb_dynamic -o cb_main_dynamic > + ./cb_main_static > GOOD COMMON BLOCK > + ./cb_main_dynamic > BAD COMMON BLOCK > > > balay@ps4 ~/junk > $ uname -a > CYGWIN_NT-6.1 ps4 2.0.4(0.287/5/3) 2015-06-09 12:22 x86_64 Cygwin > > balay@ps4 ~/junk > $ gfortran --version > GNU Fortran (GCC) 4.9.2 -- 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: Unable to run excel via cron
> On 06/23/2015 09:39 AM, Kertz, Denis (D)** CTR ** wrote: > > I changed the cron setup to use cygserver as Corinna suggested. I used > > cron-config and cygserver-config to setup the cron and cygserver services > > and passwd -R to establish my password. Normal cron jobs run under this > > setup but Excel still hangs as it did before. I also tried this on the > > Win7 PC that I thought worked at one time but it behaved the same with > > Excel hanging. > > > > So it looks like Corinna's first case is the situation - there is no > > solution. There apparently is something unique about Excel that will not > > run in this Win7 cron environment. > > It's actually not unique to Excel and it's not peculiar to Cygwin's cron. > Any program that requires desktop interaction to run would suffer this same > limitation on Vista and beyond if started from a service. In the Cygwin > environment, cron is run as a service and used to start programs, so it's > the obvious 'culprit' reported here but it's just one of many possible > vectors that exhibit the unwanted behavior on Windows. Just FYI. > > -- > Larry > I think Denis is saying Excel hangs even if it doesn't require user interaction. I.e. it runs some macros and exits. On Win7 Pro, I was able to run the following .vbs script via the task scheduler and have it run the "AddTimeInColumn" macro. The resulting spreadsheet had the times the task was run column A. Andy Here's the .vbs script: Dim args, objExcel Set args = WScript.Arguments Set objExcel = CreateObject("Excel.Application") objExcel.Workbooks.Open("C:\cygwin64\home\Andy\ExcelTest\TestExcel.xlsm") objExcel.Visible = True objExcel.Run "AddTimeInColumn" objExcel.ActiveWorkbook.Save objExcel.ActiveWorkbook.Close(0) objExcel.Quit Here's the macro: Public Sub AddTimeInColumn() Dim LastRowInColumn As Long LastRowInColumn = Cells(Cells.Rows.Count, "A").End(xlUp).Row 'If column is completely blank, need to adjust last row If Cells(LastRowInColumn, "A").Value = "" Then LastRowInColumn = 0 'Insert time in next row Cells(LastRowInColumn + 1, "A").Value = Time() End Sub -- 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: python binary retrieved via (cygwin) git clone does not execute - error 127
> The problem has only been seen with the git > that ships with 64-bit cygwin. Use “ldd” - against the executable, determine the exact file (absolute path) of every dll that is used/required. Including any missing DLLs. You might also need to walk through your “Python Library” (where all of the python loadable modules are stored) Remember: LDD will only tell you the DLLs that are used, it will not tell you about the modules that are loaded. Use a “DLL Explorer” program to determine exactly what type of DLL (32bit or 64bit) of each DLL. Examples: Dependancy Walker, ‘DumpBin” - there are a number of tools that help Painful process :-( I have ran into this many times with other things. have also run into problems with Python DLLs built with different versions of Visual Studio. (The C runtime library is different) In the end, I have had to put a shell wrapper around Python - so that it would *change/reset” various Python ENV variables. With multiple versions of python (32,64, 2.7, 3.0, windows, cygwin, local-build) nothing is consistent. Again painful. -- 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
python binary retrieved via (cygwin) git clone does not execute - error 127
I cloned a repository using the git that comes with 64-bit cygwin. Executing python.exe in the repository results in an immediate return and an exit code of 127. The python executable was built in 32-bit cygwin. The executable works fine is 32-bit cygwin and 64-bit cygwin shells as long as the repository was cloned with the git I was using before, msysgit. I have had no problem with python in the same repository on the Ubuntu and Mac OS platforms. The problem has only been seen with the git that ships with 64-bit cygwin. 64-bit cygwin - cygwin version 1.7.33 - git version 2.1.1 32-bit cygwin - cygwin version 1.7.18 - git version 1.8.1.msysgit.1 I have tried the git config core.filemode option with true and false values. This did not help. git ls-tree shows the same file mode and checksum in both repositories,: 100644 blob abc25ddb6ed66d1bfe3f58de77b3fd3437b8e21fpython.exe As per a post on the web, I tried to fix this using: git update-index --chmod=+x python.exe git commit ... While that does change the file mode, python still exits with 127: 100755 blob abc25ddb6ed66d1bfe3f58de77b3fd3437b8e21fpython.exe Python is in the path: $ which python /home/x5551212/workspaces/infra/main/python/2.7.5/windows/python Any idea what the cygwin provided git is doing differently than other git implementations? Thanks, -Rick -- 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: gdb arbitrarily starting threads
People who can reproduce this problem and can also build their own GDB are encouraged to try the patch posted here: https://sourceware.org/ml/gdb/2015-06/msg00071.html and report whether it solves the problem on Cygwin. (I already verified that the native MinGW debugging is fixed by that patch.) Thanks. -- 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: Uses of Cygwin
On Jun 24, 2015, at 7:01 AM, Alvin Oo wrote: > > 1) does it support ruby,python,c++,c, java? The Cygwin package search engine answers questions like this: http://cygwin.com/cgi-bin2/package-grep.cgi You can also search from within setup.exe on the package selection screen. Cygwin has packages for all of the languages you mention, though the Java implementation is from GCC, not Oracle Java. While you can run Java programs using Oracle’s JVM while under Cygwin, the interoperability between the two won’t be as good as if there were a “native” Cygwin Java. You may find that it’s better to run under GCJ if you need tight interaction with Cygwin executables. > 2) What type of shell does it support? (sh,ksh) The default Cygwin shell is Bash. The rest of your question is even easier to answer from setup.exe: just open the Shells category on the Select Packages screen. Some random observations: - There is no rc/es, if you’re a Plan 9 refugee. - scsh is only in the 32-bit version; no one has bothered to port it to 64-bit Cygwin yet. - Cygwin only has one of the ksh clones, mksh. No one has decided to adopt AT&T ksh yet. > ,what can it emulate? I’m not sure what you’re asking. If you can find Linux or BSD-compatible source code for an implementation of a shell you want to use, it can probably be made to build and run under Cygwin. Cygwin doesn’t do any kind of binary emulation. Cygwin is just a user-space POSIX/Linux emulation layer that links to native Windows executables. > Is it possible for cygwin to start in a certain folder, akin to when I > drop cmd.exe on a certain folder, or name powershell to start in a certain > folder it will open up, i need to navigate to directory fast Cygwin executables are native Windows executables. Windows facilities like the “Start in” field of the GUI shortcut editor work just fine with Cygwin. Cygwin itself lives in a certain directory, and builds a POSIX-like directory system underneath that, but Cygwin executables are not confined to that tree. > 4) What are the alternatives to cygwin SFU, the NT POSIX subsystem, and U/WIN all competed with Cygwin once upon a time, but they’re now all basically dead. The MinGW project provides a small subset of the packages in Cygwin. They don’t use the Cygwin POSIX layer, so they operate in a more “native” Windows fashion, in that they take Windows file paths and such. This has both advantages and disadvantages. Basically, if you’re looking to do Linux-like things on Windows, you probably want Cygwin. If you just want GCC on Windows, MinGW may suffice. > what are the advantage and > disadvantage of cgywin? Advantages: - It implements most of the POSIX.1 and POSIX.2 interfaces, plus a lot of Linux-specific things like /proc/cpuinfo and /dev/dsp, which allows most of what you find on a typical Linux system to run on Windows, more or less seamlessly. - It integrates with Windows about as well as it’s possible to given the current state of the art. - It has a huge package repository [1] and a vibrant user community, and it is under active development. Disadvantages: - Being a POSIX layer for Windows, it has to be fairly thick where Windows semantics are incompatible. Examples are fork(2), ACLs, and terminal I/O. This can mean semantic mismatch and slow-downs relative to Linux running on the same hardware. [1] http://stackoverflow.com/questions/21230657/ > 5) What are the most common uses of cgywin? What are the most common uses of Windows and Linux? :) -- 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: Uses of Cygwin
I will take a stab at these questions. My answers may not be complete or best. On 24 June 2015 at 07:01, Alvin Oo wrote: > 1) does it support ruby,python,c++,c, java? The cygwin environment supports ruby, python, c++ and c. I don't know about java. > 2) What type of shell does it support? (sh,ksh),what can it emulate? dash, bash, ksh all seem available. > 3) Is it possible for cygwin to start in a certain folder, akin to when I > drop cmd.exe on a certain folder, or name powershell to start in a certain > folder it will open up, i need to navigate to directory fast There are multiple ways of accomplishing something like that. The default is to start in a home directory but one could script a different home directory depending on 'shortcut'. > 4) What are the alternatives to cygwin, what are the advantage and > disadvantage of cgywin? I would expect the most common alternative would be to use Linux or BSD in a VM. The second alternative would be to use a Windows environment. > 5) What are the most common uses of cgywin? Good question that I have no answer too. [I know that I use it for a Unix environment in a Windows system.. however there are many other uses I have read like using it to have opensource programs consistently compiled on a windows system etc. I don't know which ones are common] > > > -- > 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 > -- Stephen J Smoogen. -- 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
Uses of Cygwin
1) does it support ruby,python,c++,c, java? 2) What type of shell does it support? (sh,ksh),what can it emulate? 3) Is it possible for cygwin to start in a certain folder, akin to when I drop cmd.exe on a certain folder, or name powershell to start in a certain folder it will open up, i need to navigate to directory fast 4) What are the alternatives to cygwin, what are the advantage and disadvantage of cgywin? 5) What are the most common uses of cgywin? -- 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: using fortran common block from dll created by gfortran
Hi, while this is not directly related to gfortran on Cygwin, this article might help you appreciate the issues involved: https://software.intel.com/en-us/node/535307 Are you bound to common blocks? If not, you may get better results when you put the data in a module. Regards, Arjen 2015-06-24 6:30 GMT+02:00 Satish Balay : > Hi Cygwin, > > I'm debuging an issue with dlls with cygwin gnu compilers - and have > narrowed down the issue to the attached test case [script]. > > Could you guide me to correct usage of 'fortran common block' with dlls? > > [In this example - using fortran 'common block' via static library > works. However the same code using a .dll fails] > > Thanks, > Satish > > - > > balay@ps4 ~/junk > $ ./cb_test.sh > + cat > + cat > + rm -f '*.o' '*.dll' '*.a' '*.exe' > + gfortran -c cb_func.f cb_main.f > + ar cr libcb_static.a cb_func.o > + gfortran cb_main.o -L. -lcb_static -o cb_main_static > + gfortran -shared -o libcb_dynamic.dll cb_func.o > + gfortran cb_main.o -L. -lcb_dynamic -o cb_main_dynamic > + ./cb_main_static > GOOD COMMON BLOCK > + ./cb_main_dynamic > BAD COMMON BLOCK > > > balay@ps4 ~/junk > $ uname -a > CYGWIN_NT-6.1 ps4 2.0.4(0.287/5/3) 2015-06-09 12:22 x86_64 Cygwin > > balay@ps4 ~/junk > $ gfortran --version > GNU Fortran (GCC) 4.9.2 > -- > 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