The tag "small-basix" is for Technical questions about Microsoft Small Basic, the only text-based language and IDE built for students to learn to code
Please look for a more fittimg tag as your question in not about Small Basic e.g. the tag "C++"
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hallo,
I have created a visual c++ app in visual studio 2010. I tried to pass some command line args which I set up in Project->Properties->Debugging, in particular some paths that required for the program to work ($(TargetPath) and $(ProjectDir)). See relevant code of the main class:
int main(array<System::String ^> ^args) //args is the array with the several paths I want to pass.
{
//MessageBox::Show(/args[0]/"1", "0.1", MessageBoxButtons::OK, MessageBoxIcon::Information);
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
// Create the main window and run it
Application::Run(gcnew Form1(args));
return 0;
}
When I run my app through visual studio the command line args are working properly and are passed into the software.
But when I install my software (through a set up I have created with visual studio) and trying to launch it, it seems that the command line args cannot be read properly, in particular whatever I have set in the command arguments textbox of the Project->Properties_>Debugging, I always take the $(TargetPath) and olny that. As a result the software fails to launch as it requires the other path too.
The tag "small-basix" is for Technical questions about Microsoft Small Basic, the only text-based language and IDE built for students to learn to code
Please look for a more fittimg tag as your question in not about Small Basic e.g. the tag "C++"