- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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 kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
How is it possible?
Teclis
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
(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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
My guess is that there's perhaps a PATH issue, with perhaps different DLLs being loaded in the different environments.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
@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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Teclis
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Teclis
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Teclis
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Teclis
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite