Forum > Windows

optimized sources

<< < (35/179) > >>

Simon:
Heinz, sounds like you need some quotes for the debug command.


--- Quote ---I did it in Projektmappenexplorer --->seti_boinc -->Eigenschaften --->Konfigurationseigenschaften --->Debuggen --->Befehl --->
C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build\Debug\setiathome_2.3S5B_windows_intelx86.exe -bench -show_benchmark
--- End quote ---

should be:

"C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build\Debug\setiathome_2.3S5B_windows_intelx86.exe -bench -show_benchmark"
instead.

Since it does recognize the command and seems to be able to find the files, this is the most logical explanation.

If the above does not work, I recommend something even simpler: write a batch file with the commandline options, and put that as debug command.

HTH,
Simon.

_heinz:
Hi Simon,
thanks for your proposals
-----------------------------------------
Let´s document what happen:
variant_1 Befehl: "C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build\Debug\setiathome_2.3S5B_windows_intelx86.exe -bench -show_benchmark"

The code:
int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR Args, int WinMode )
    {
    LPSTR   command_line;
    char    *argv[100];
    int     argc, retval;    <----both are not initialized(undefined value)

    command_line = GetCommandLine();    <---here
    argc = parse_command_line( command_line, argv );
    retval = main( argc, argv );

    return retval;
-------------------------------------------------------------------------
from debug:
-      command_line   0x00151ee0 ""C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build\Debug\setiathome_2.3S5B_windows_intelx86.exe" "   char *
how we can see no parameter will be assigned

 ---------------------------------------
variant_2: without quotes
Befehl: C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build\Debug\setiathome_2.3S5B_windows_intelx86.exe -bench -show_benchmark

 +      command_line   0x00151ee0 ""C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build\Debug\setiathome_2.3S5B_windows_intelx86.exe" "   char *
----------------------------------------------------------------------------------------------------------------------------------------
no parameter will be assigned
interesting the qouots, I marked red
----------------------------------------------------------------------------------------------
variant_3
Befehl: C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build\Debug\setiathome_2.3S5B_windows_intelx86.exe
Befehlsargumente: "-bench" "-show_benchmark"
+      command_line   0x00151ee0 ""C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build\Debug\setiathome_2.3S5B_windows_intelx86.exe" "   char *
-------------------------------------------------------
no argument is assigned
and in all variants argc and retval have undefined values
------------------------------------variant_4
code:
int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR Args, int WinMode )
    {
    LPSTR   command_line;
    char    *argv[100];
    int     argc, retval;
    argc=retval = 0;  <---new
    command_line = GetCommandLine();       <----------------
    argc = parse_command_line( command_line, argv );
    retval = main( argc, argv );

    return retval;
    }
-------------------------------------------------
-      command_line   0x00151ee0 ""C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build\Debug\setiathome_2.3S5B_windows_intelx86.exe" "   char *
-----------------------------------------------------
think "GetCommandLine(); did not work right.........
will search why

heinz

_heinz:
I should read documentation  :)

_heinz:
found the following instruction set   ---->

Befehl (Lokaler Windows-Debugger)
Gibt den Startbefehl für das auf dem lokalen Computer zu debuggende Programm an.

Befehlsargumente (Lokaler Windows-Debugger und Remote-Windows-Debugger)
Gibt Argumente für den oben aufgeführten Befehl an.

In diesem Feld können die folgenden Umleitungsoperatoren verwendet werden:

< file
Liest "stdin" aus Datei.

> file
Schreibt "stdout" in Datei.

>> file
Fügt "stdout" an Datei an.

2> file
Schreibt "stderr" in Datei.

2>> file
Fügt "stderr" an Datei an.

2> &1
Sendet "stderr (2)"-Ausgaben an denselben Speicherort wie "stdout (1)".

1> &2
Sendet "stdout (1)"-Ausgaben an denselben Speicherort wie "stderr (2)".

In den meisten Fällen sind diese Operatoren nur auf Konsolenanwendungen anwendbar.
------------------------
Arbeitsverzeichnis
Gibt das Arbeitsverzeichnis des zu debuggenden Programms relativ zum Projektverzeichnis mit der EXE-Datei an. Wenn Sie kein Arbeitsverzeichnis festlegen, wird das Projektverzeichnis verwendet. Beim Remotedebuggen befindet sich das Projektverzeichnis auf dem Remoteserver.
----------------------------
Projektverzeichnis ist das Verzeichnis in dem sich die .sln Datei befindet. In unserem Fall seti_boinc.sln im Verzeichnis winbuild
C:\I\SC\seti\seti_boinc_2k3_2.2B-Ben-Joe\client\win_build
heisst die Dateien boinc_lockfile, stderr.txt, work_unit.sah müssen in dieses Verzeichnis kopiert werden.
Das ist bei mir auch so.
-------------------------------
Hätten wir das also auch geklärt.

heinz

_heinz:
reading documentation
1. int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR Args, int WinMode )   :o
2. command_line = GetCommandLine();  ::)

zu 1. found this --->http://msdn.microsoft.com/library/deu/default.asp?url=/library/DEU/vccore/html/_core_revising_the_winmain_function.asp
zu 2. found this --->http://msdn2.microsoft.com/en-us/library/ms683156.aspx

It looks like there is still something to do
be patient... work is going on
heinz

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version