S
SeppyVS
Guest
Dear Users,
I have Visual Studio 2019 Community.
I am working on one Project which reads sensors via Serial Port.
It is one Solution with Multiple Projects.
One Project is the Main Application which manages the data values and sends them to the defined destination. Since there are multiple companies of these sensors which have slightly different attributes, I have chosen to use DLLs for the implementation for the sensors.
so the Main Application reads the config file and loads the DLL for the appropriate Class.
The Header of the first DLL Project is:
namespace logger::companyA{
class Modbus : public Reader{
//[...]
void runService();
//[..]
};
}
and the namespace of the second DLL Project is:
namespace logger::companyB{
class Modbus : public logger::Reader{
//[...]
void runService();
//[...]
};
}
now the weird behaviour of Visual Studio IDE is:
when I add a function for overriding at companyB and press ALT+SHIFT+F10 it jumps to the CPP File of companyA which is in another folder and has already the function or If it hasn't it adds the the Implementation there instead of the Modbus.cpp inside the correct folder.
And another weird situation:
If I add a function at companyB it will not mark the function with green underlines (for no definition ) if companyA Modbus has the definition. Of course if I tried to compile the Project with the definitions in the wrong file or completely missing it would throw errors since the compiler can't find the definitions. So it is just an IntelliSense problem. The Compilition is correct.
I've set the C++ Standard to C++17
Continue reading...
I have Visual Studio 2019 Community.
I am working on one Project which reads sensors via Serial Port.
It is one Solution with Multiple Projects.
One Project is the Main Application which manages the data values and sends them to the defined destination. Since there are multiple companies of these sensors which have slightly different attributes, I have chosen to use DLLs for the implementation for the sensors.
so the Main Application reads the config file and loads the DLL for the appropriate Class.
The Header of the first DLL Project is:
namespace logger::companyA{
class Modbus : public Reader{
//[...]
void runService();
//[..]
};
}
and the namespace of the second DLL Project is:
namespace logger::companyB{
class Modbus : public logger::Reader{
//[...]
void runService();
//[...]
};
}
now the weird behaviour of Visual Studio IDE is:
when I add a function for overriding at companyB and press ALT+SHIFT+F10 it jumps to the CPP File of companyA which is in another folder and has already the function or If it hasn't it adds the the Implementation there instead of the Modbus.cpp inside the correct folder.
And another weird situation:
If I add a function at companyB it will not mark the function with green underlines (for no definition ) if companyA Modbus has the definition. Of course if I tried to compile the Project with the definitions in the wrong file or completely missing it would throw errors since the compiler can't find the definitions. So it is just an IntelliSense problem. The Compilition is correct.
I've set the C++ Standard to C++17
Continue reading...