LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

using GLE with system function

Hi!
 
I have a line in my code like  this:
 
system("gle -d pdf c:/GLE-Creator1.0/teszt1");
 
This work just fine.
 
But if i make flexible my code, via using a char :
char glename[300];
for example, it doesnt work, i get error code -3, "cannot open file"
 
system(glename);                  --->this way it is not working.. 
 
(the printf("%s", glename);   gives this result:                  "gle -d pdf c:/GLE-Creator1.0/teszt1"    so just exactly the same like in the
working one... Why does'nt work this way?
 
Thank you very much for the help,
regards,
                          Andras B-D.
 
0 Kudos
Message 1 of 3
(2,979 Views)
Okey, i made the error by including " " in the char, the code is working now. But only if i operate it on file in the same dir where the LabWin code is. If i try to operate it in a different dir, it cannot open the file...
0 Kudos
Message 2 of 3
(2,963 Views)
Sorry, my question is irrelevant. The problem is not with LabWin, but the GLE4 creates the problem if i want to compile a gle file what is not in that DIR where i launched the gle.exe.
best regards,
ABD
0 Kudos
Message 3 of 3
(2,955 Views)