How does one create a Standalone exe with CLion that can run on any windows computer for C++
I am currently studying C++. I need to create a stand alone exe that will work on any PC running windows.
I have created a programme that reads information from a csv file and does some operations on the data and converts it into the necessary format. then writes it to another csv file.
I finally got all the features working correctly and all outputs are too correctly converted, I then created the exe moved it on my pc. Got it to work from anywhere on my pc by adding some code to CMake.
I tried it on another pc. and the programme executes but it throws an error after a few loops. See below and attached:
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::insert: _pos (which is 4294967295) > this->size() (which is 1)
I also checked the partially created csv and it seems the some of the data was not converted correctly. Maybe it's got something to do with the string to int conversions and vice versa? Is there anything I need to add to CMake that would sort this out? How do I fix this?
Any help on this matter would be greatly appreciated.
Regards,
Kyle

请先登录再写评论。