A program im writing successfully runs on the IDE visual studio code. However, when attempting to use the Bitvise SSH client to run my program I get a list of errors that I myself cannot understand the problem for. Bitvise it another way to access the CMD client from a remote server, for all intenstive purposes it acts the same as windows CMD. I will provide a screen cap of the errors and a full run down of the parts of my program that I believe are causing the errors. If any further code is required please feel free to ask.
errors screen cap
This error report shows a common error, with something being a placeholder for all instances.
multiple definition of `something' /tmp/ccBhjFYn.o:(.bss+0x0): first defined here
This error DOES NOT happen in visual studio code
From this error report it can be seen the issue is found within driver.cpp and my header.h file. For this reason i wont provide a minimal code for these files, but they are small enough to not require one.
MAIN
int main()
{
Customer c;
Part p;
Builder b;
const string fileName = "Parts.txt";
auto partsVec = readpartFile();
auto customerVec = readcustomerFile();
auto builderVec = readbuilderFile();
fexists(fileName);
complexity(c, partsVec);
robotComplexity(partsVec,customerVec);
writeFile(buildAttempt(b, complexity(c, partsVec), variability(customerVec, builderVec)));
return 0;
}
HEADER FILE
#include <vector>
#include <string>
struct Customer {
std::string customerName;
std::string projectName;
std::string listofParts;
} myCustomer;
struct Part {
char partCode;
std::string partName;
int maximum;
int minimum;
int complexity;
} myPart;
struct Builder {
std::string builderName;
int ability;
int variability;
} myBuilder;
bool fexists(const std::string filename);
std::vector<Part> readpartFile();
std::vector<Customer> readcustomerFile();
std::vector<Builder> readbuilderFile();
float complexity(const Customer& c, const std::vector<Part>& parts);
void robotComplexity(const std::vector<Part>& vecB, const std::vector<Customer>& vecC);
double variability(const std::vector<Customer>& customerList, const std::vector<Builder>& builderList);
std::vector<double> buildAttempt(Builder b, double variaiblity, double complexityRobot);
void writeFile(std::vector<double> build);
Thankyou for any help. This question may be hard to understand and follow but i did try my best. Any sugguestions to help improve this question are welcome but please be friendly :)