Fortran .for file and Microsoft Visual Studio. How Can I Run It? - visual-studio

I'm new in Fortran and I need your help.
I'm a space engineering student and I'm used to code in MATLAB.
Right now I'm writing my MSc thesis and I have to deal with a code written in fortran77 (I'm guessing it by its extension ".for"). The code has already been tested and used in other occasions.
I use Windows 10 as an operating system and I know that sometimes an old code could show problems depending on the system in which it is run (for instance I've heard about the need of running old versions of an operating system through emulators to solve some problems).
I hope I can still use Win10 for the purpose.
So, I have done the following steps (based on what I have found on internet) in order to configure my system:
I have installed the last version of Microsoft Visual Studio Community 2019
I have installed Intel OneApi Basic Toolkit and then Intel OneApi HPC Toolkit (the last one is an add-on that contains the fortran compiler).
It seems that both are well configured/integrated and I think they are working properly.
Now, when I try to open the project from Visual Studio, the .for extension isn't apparently recognized.
So I've tried to open it as a simple file, and in doing so, I can visualize it on VS.
I don't know If It is the right procedure, and I don't know if it works as it should.
How can I prove it?
I try to run it, but nothing seems to happen (no error flag by the way).
I'm totally new in this field, so any "obvious" suggestions will be really appreciated.
I'm open to any tips, even If it is better to change compiler (I've heard about gfortran) or use other kinds of softwares. I would be also grateful if someone could suggest me a beginner useful guide.
Thanks to whoever wants to help me out.

Related

Compiling Visual C++ code in linux

I have written a code in visual c++ , which is a sort of GUI used in virtual com PORT connection. However , i need to run that code in linux so that i can make it an open source. Since , visual c++ doesn't work in linux, I need to find out some alternatives.
So, please me what all alternatives I have
Thanks for your valuable time..!!
i need to run that code in linux so that i can make it an open source.
No, you can license code as open source without it running on linux.
If you simply want your code to run under linux you need to learn how to port from VC++ to Linux/GNU. It's not simply a matter of re compiling it.
See the following URL for advice and google search for more if required: http://www.johndcook.com/blog/2008/05/29/porting-visual-c-code-to-linuxgcc/
In my experience you can get a looooong way with
http://www.winehq.org/docs/winelib-guide/winelib-toolkit
winemaker (doing things as making all your includes case-sensitive correct on Linux)
winegcc (linking to the winelib runtime libs so you can have _WinMain and stuff like that just work)
Of course there are libraries that simply don't exist. Also, installing an SDK can be daunting; winetricks.sh is very helpful in that department. Also, you can consider 'XCOPY' deploying the SDK into your linux build tree and working with that;
This has successfully let me cross compile MSVC projects linked with 3rd party windows libraries in the past. Note minor incompatibilities due to having slightly different linkage semantics with gcc/GNU ld by default; expect this to affect areas like RTTI and exceptions thrown across DLL boundaries).
YMMV
Edit I want to confirm the fact that you can have perfectly valid opensource code for windows only, and you can build it using Visual Studio too. If you want to be nice to your (prospective) contributors, make sure you only depend on Visual Studio Express C++ (not MFC, e.g.) but hey, that's really up to you!
which is a sort of GUI used in virtual com PORT connection
This will be probably hardly portable (because of the BIG differences how virtual ports and GUI are handled in linux and windows - unless you used some cross-platform library already in Windows).
You can release your code as OpenSource for Windows only.

Binary Decision Diagram library for windows

After trying to get jinc compiled under windows and quickly running into hundreds of compiler errors I'm looking for a quality BDD library that will build for windows. Preferably in C or C++ but as long as I can bind to it I'm happy.
I recently wrestled with installing the CUDD v2.4.2 in a Windows / Visual Studio environment.
There is documentation out there, but in my opinion none of it gives the complete picture of how to install the thing and get it working in non-Unix environments. For example, how to address the issues with the Makefile, how to link to the *.a C archive files in your project, minor issues with the cpu_stats.c file, etc. This is a shame because CUDD seems to be quite a powerful means of reducing complexity for many problems, such as integer programming.
I recently managed to get it going in VS 2010. My blog details here.
Cudd is is good : http://vlsi.colorado.edu/~fabio/CUDD/ I have compiled it in Visual Studio 2005.
There seems to exist pre compiled binaries : http://web.cecs.pdx.edu/~alanmi/research/soft/softPorts.htm
As an ex researcher, I can tell you that two years ago, Cudd was the best in class regarding efficiency.
Biddy is becoming better and better.. http://biddy.meolic.com/
OK, this is a subjective claim, because I am the main author of Biddy. However, while Biddy does not have so many functions and it does not
have so robust and improved memory management and it has not
been tested in so many projects as CUDD, it is a viable library.
By using it, you can help to improve it. My group is active and flexible
and we can implement any function you need.

Need some pointers/hints in writing a Windows Application

I want to create applications in windows that has complete portability (within windows OSes of course). I have tried using one application written in Visual C++ but I had a real tough time in making it run in other windows OS (like it required .net framework libraries to be installed). This put me on the back foot because I had to copy a set of DLLs from one machine to another and most of the time something works some does not.
And I am TOTAL amateur in writing windows based applications since my technological forte is mostly Java. Where to kick off? (like which tools/IDEs to begin with since I am seriously into writing my own utilities/tools).
I am open to clarification should you guys feel my question is vague/blunt.
Thanks.
Visual C++ should be easily able to do what you want. It sounds like you created a C++/.NET project, which will generate a dependency on the .net libraries. You need to choose a different project type when the wizard starts up.
If you have a paid version of Visual C++, you might try clicking on "MFC Application". A lot of people are down on MFC these days, but it's still a quick way to get a C++ Windows app off the ground. Make sure you choose the option to statically link the MFC libraries, or you'll have another dependency.
MFC isn't included in the free version of Visual C++, so you'll need to go old-school and work directly with the Windows API or find another package such as QT or Wx to link with.
You can use .NET, and if you stay in 2.0, use standard components, it should work fine. You may need to make a few changes to work anywhere, buy very possible.
http://www.mono-project.com/Main_Page
You could either use Visual Studio or the free IDE. Sharp develope or Mono Develope.
If you really want it to work on every version of windows your best bet may be to go the route of full cross-compatibility. Grab the Boost, QT, and possibly ACE libraries and stay away from making OS calls directly. There's a free version of Visual Studio which is probably what you want for an IDE for personal development, if you're doing commercial stuff then get the full version.
Why not use Java. The JVM is on more systems then .NET and now your app will work on any OS not just windows. Plus java is easier for a beginner then C/C++ and less chance that your program will cause BSODs.

CodeCharge Studio alternatives for Mac?

I'm a happy user of CodeCharge Studio but sadly it's the only reason to have a virtual machine with parallels, everybody here use a Mac. Does anyone know some other tool that generates PHP code and runs under OS X?
None that would be as good Code Charge Studio.
I run vmware fusion on my macs just for Code Charge Studio, and it's worth it to me until YesSoftware creates a mac version, hint hint. I'd love to have it run nativity on my mac!!!
According to it's website, ScriptCase is usable through a web-browser.
The APEEL PHP Generator site has done some comparisons of other PHP Code Generators:
The reviews are pretty fair and cover costs, installation and some comments about generated code structure. Most of them, however, are Windows only.
Having said that, I also use CodeCharge Studio in VMWare on my Mac and am very happy with it in comparison to other tools. I work in both .NET and PHP projects and so the single tool for both (and switching between languages) is fantastic.

searching VB6 code

I've inherited a ASP/VB6 code base (not my forte... yet) and I'm trying tease it apart to figure out the cause on an error message I'm receiving when running the app.
I've traced it back through an event that is being raised in on of my classes. Is there away in windows I can search the bulk of the code base for where it is being consumed?
Ctrl-F (and selecting Current Project) has not sufficed.
The linux geek in me is saying dump it to a insert distro box and just grep for the sucker. But there's got to be some way in the IDE to do it... right?
But there's got to be some way in the IDE to do it... right?
No. There are some plugins for the IDE, such as the MZ Tools that might help. Otherwise, just use the find tool from the Windows command line. Not nearly as comfortable as using grep, of course.
If you have any new version of VS (2003,5,8) installed, just use the "Find in Files" feature and point it at the VB6 folders.
Other than that, most "notepad" replacements (textpad, notepad+) offer a "Find in Files" as well.
Check out http://www.mztools.com/index.aspx
MZ-Tools 3.0 is a freeware add-in for Visual Basic 6.0, Visual Basic 5.0 and the Visual Basic For Applications editor.
It is essential for anyone still working with VB 6.0
It has an enhanced find feature as well as a calling Procedure similar to .net Find usage.
I have a large legacy code-base in VB6 which needs maintenance from time to time and I have used Microsoft Desktop Search on my local copy to help find variable and method names across the code files.
Also Grep is available for Windows.

Resources