Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.exe won't start

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a program made with C++ OpenGL, and I'm now trying to run it with diretor, but it won't start.

I'm using the command open "c:\**\***.exe"

some help would be great,
 
your code looks correct, is it throwing up any error messages? Does anything happen at all? Post the entire code block that this code is in (unless its huge).

 
I get an error message reading "could not load object", but that's an error message for my C++ program. The program I've made works fine if I start it by double clicking on it, it finds all objects it's supposed to load. But trying to start it in Director doesn't work, suddenly my program won't find the objects it's supposed to load.

on mouseUp me
open "D:\*\*\*.exe"
end
 
hmm, ok.

Im not much of a C++ programmer(ok, so not at all) so I am only guessing how to do it.

My guess would be that your C++ program doesn't know where it was run from and hence doesn't know where to search for its own files, it may think it was run from the same folder as the director movie.
Try calling a batch file that calls the .exe file.
thats about all I can thik of.


 
Thanks,
It's correct my exe file didn't know where to find the files it was supposed to load.
Now it works fine, all I had to do was to put everything in the same folder, and as you say a batch file solves the problem if I don't want to put the files in the same folder.
Bye the way is there a simple way to save some kind of options like playername in a file from director?
 
yes

setPref prefName, prefValue

and

getpref

They write and read a text file on the local HD. Lingo dictionary has all the details.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top