How can I compile the .xe file to .bin file by xTIMEcomposer studio? - xmos

enter image description here:I want to get a bin file by compiling the .xe file. And I had try export but no effect.

Related

How to generate mymodule.contract.h with vsdconfigtool?

I want to write a native custom visualizer for visual studio debugger. I started from scratch and I am following this example
https://github.com/microsoft/ConcordExtensibilitySamples/tree/main/CppCustomVisualizer/dll
But I am stuck generating the equivalent for "CppCustomVisualizer.Contract.h".
It is required to compile CppCustomVisualizer.dll. I read that vsdconfigtool generates this file, however when I run "vsdconfigtool mymodule.vsdconfigxml mymodule.vsdconfig" it says an input dll is required
"ERROR: No input dlls were specified on the command line. At least one .dll file is required to output a .vsdconfig file."
What is this input DLL?
It turns out there are two syntax, one for generating the header file and another for generating the vsdconfig file, I was mistakenly trying to generate both header and vsdconfig file in the same step. This is the syntax:
synax: VsdConfigTool <input_config> <input_dll> <ouput_config>
-or-
VsdConfigTool <input_config> <output_header>
mymodule.contract.h
If I run vsdconfigtool mymodule.vsdconfigxml mymodule.contract.h it generates the header file mymodule.contract.h.
Then, to generate the mymodule.vsdconfig, after having compiled mymodule.dll, vsdconfigtool mymodule.vsdconfigxml mymodule.dll mymodule.vsdconfig.

How to replace the source file with my own source file (from download or edit) in Xcode?

I'm using Xcode as an IDLE editor of C language. I downloaded an SDK package from a algorithm competition website and compiled it successfully on the terminal, but now I have a need to compile and run the source .cpp file(that inside the SDK packadge) directly by Xcode, so:
Is there a way to replace the CPP source file of command-line-tools project with the CPP source file that I specify the path of it?
Or is there a way to creat a new command-line-tools project from the specified path CPP source file?
I've now Solved this problem through the method one whitch says "Is there a way to replace the CPP source file of command-line-tools project with the CPP source file that I specify the path of it?", but still have no idea about method two.
Just creat a symbolink of CPP source file and right-click the project, add the alias to project. Because the "add" is copy in fact, instead of "import" or "open". Only by copying the alias can the purpose of modifying the source file be achieved.

Opening .txt file via executable file (compiled c++ code) on Mac

I have an issue with my compiled c++ code on Mac. I have written an app that read .txt file, but when I compile the source code via
g++ main.cpp -o MyApp
and run it, MyApp is not opening the .txt file. (I have both executable and .txt file in the same directory).
But when I just compile my .cpp file, not making executable, just compiling (getting .out from .cpp) and run it via terminal, it works perfectly.
g++ main.cpp
./a.out
I am opening the file by:
ifstream myfile;
myfile.open("list.txt");
Does anybody know how to fix this issue and connect the executable file with that text file? I would be very grateful.
Ok I have finally found the solution. I tried open .txt file with absolute path to and everything works fine. The only problem now is when I move the project to another directory so I have to compile it again with different path.
Helped:
myfile.open("/Users/macbook/Desktop/Program/list.txt");
instead of
myfile.open("list.txt");

How to add .xml file to .dll project in Code::Blocks editor

I have written a small c++ program to read the content of a .XML file.
It works as a console application. But when I compile the project as a .dll it gives no error but ignores the .XML Content.
My question is how to include the .XML file into my .dll
I am using the Code::Blocks IDE. I set the checkmark with options->compile when right-clicking on the .XML file, but this doesn't help. I also tried to include the .XML in my code with
#include <data.xml>
but now I get error Messages. Please help.
I have found a workaround for my problem:
I define the content of my .XML file as a string xml_message and then use
#include "data.xml"
xml_document doc;
doc.loadSring(xml_message.c_str())
instead of
xml_document doc;
doc.loadFile("data.xml");

Visual Studio 2010 run .exe from command line vs run (f5) debug

I am new to c++ and am making a very simple program. All my program does is call a function from the main function, which reads in a text file and returns. To check that I am reading in the file correctly, I am trying to print out the strings I have read in. The print out (cout) works properly when I run from Visual Studio (f5). However, when I run the executable from command line, none of the print outs from my function show up. Only print outs directly in the main function appear. I cannot find a similar question elsewhere. Any help would be appreciated.
When you run a program from within VC++ the current directory is set to the project directory by default, but the application is by default in a different folder.
E.g. the application may be:
D:\Work\MyApp\Debug\MyApp.exe
But the project directory may be:
D:\Work\MyApp\MyApp\
When you start the program from outside of VC++ you need to take steps to make sure the current directory is correct, or that the executable and any data files it refers to are in the same folder.
The default working directory for an IDE-launched project in Visual Studio is the project folder. This is the folder where you project file resides (the .vcproj or .vcprojx file is the project file).
If the data file you are reading is in the same folder, code like this:
std::ifstream inf("datafile.txt");
will succeed because the current working folder and the folder where the data file resides are the same.
However, if you switch to where the executable was written (typically this is the project-dir/Debug or project-dir/Release folders) and run the same executable from a command-shell, the data file will not be found.
To test this is the case. Do the following:
Open a command prompt.
Switch to the project folder where your data file resides.
Run the executable with a specified path: ./Debug/YourProgram.exe, for example.
Note: you can avoid this by having the program take the data file name as an argv[] parameter. Then your program will simply use whatever file you tell it to at launch-time.