Exe file wont work outside VS folder

Jan 1, 2017 at 6:35pm
Hello all,

I am very new to programming in general; however i have indeed created a C++ program that does work for what i need it to. the program will be called from a IPC PLC (Beckhoff). It will read variables from the PLC then open the specified text file and convert it to robot code. the program has been successful to date. however; i had to make some minor changes to a few arrays that were not large enough. now, if i run the exe file from the project folder everything works great and the communication to the PLC works fine; but, if i move the exe file to any other folder (including the PDB file) it just crashes right away.

has anyone has a similar issue? or suggestions as to what i am doing wrong?

Thank you


Jan 1, 2017 at 8:56pm
Could be that the program tries to read the file that is not there. Do you pass it an relative or absolute path?
Jan 1, 2017 at 9:26pm
Is the VS .exe dependent on a .dll at run-time?
Topic archived. No new replies allowed.