- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the command prompt I simply use
ifort *.f /libs:dll my_dynamic_libraries.lib /link my_static_libraries.lib
but I found some substantial differences...
How can I know which is the complete command lines used by Visual Studio?
Best Regards
Teclis
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are usingVS 6 you could look at the .plg file generated by a build.
In theVS 7 IDE you can look at Project -> Properties and under the Fortran option and the Linker option there are Command Line entries. Also you can look at the buildlog.htm file(s) for similar info to the plg files
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How is it possible?
Teclis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Add /watch to the command line (you can do this on the command line property page in VS) and compare the path of the compiler being invoked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I verified that from DOS-prompt and Visual Studio the calculation results are different, even if the executable file is the same.
Considering the fact that I am calling some DLL and some Static Libraries, do you think that I have to check the initialization of local variables starting only from the DLL ones? or I have to check all the local variables?
Teclis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Youwould be wise torecompile and link everything with as many warnings on as possible. Particularly run the programfrom VS indebug mode so that if there are any uninitialised variables (it sounds very much as if that is the problem here) then you can catch and fix them easily and quickly.
You didn't say which version of VS you are using but :
In VS 6 look at Project->Settings->Fortran->Compilation Diagnostics there is a tick box for Uninitialised variables, and some other useful options too.
Also Fortran->Run Time for Array and string bounds plus under/overflows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(I have an Intel Fortran 9.0 and Visual Studio .Net 2003)
I found a more specific problem...
If I run the exectuable file in the Visual Fortran Enviroment or in the Command Prompt Enviroment (only cmd.exe) I found the right results; but if I run the executable file in the Fortran compiler - DOS/prompt (/K ""..IntelCompilerFortran9.0IA32BinIFortVars.bat"") I found wrong solutions.
I tried to eliminate each SET line in IFortVars.bat, till I left it blank, but I found always wrong results.
So I delete the "/K" option, and I found right results, but I don't know the meaning of that option and I cannot compile my source files.
Teclis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My guess is that there's perhaps a PATH issue, with perhaps different DLLs being loaded in the different environments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@call ".Microsoft Visual Studio .NET 2003Vc7BinVcvars32.bat"
How is it possible? In the Visual Studio enviroment my executable works well, while when I use the same bat-file (Vcvars32.bat) it doesn't work...
Moreover that file has only one command, able to point to another file bat, vsvars32.bat, where there are many sets.
Teclis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Download Dependency Walker and run it on your program both with and without the call to vcvars32.bat. Note any DLLs that have a different path.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Teclis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
depends.exe /f:1 path-to-your-exe
In the Module pane, right click and choose Select all. Then right click and Copy File Paths. Paste this to a text file. Repeat the process from a command session that called vcvars32.bat. Compare the files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But, analyzing the structure of the vsvars32.bat we find that commenting out one (or both) of the two first file rows the program works in the correct way. The two lines are reported in the following:
@SET VSINSTALLDIR=D:ProgrammiMicrosoft Visual Studio .NET 2003Common7IDE
@SET VCINSTALLDIR=D:ProgrammiMicrosoft Visual Studio .NET 2003
Teclis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Teclis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Teclis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Teclis
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page