When using multiple programs with the same name in multiple projects of the 2017 Visual Studio I get "Class pgmname has multiple definitions". I've tried using a common location but that results in "resource in use". Just for testing purposes I've renamed the programs with variations of the name to avoid the multiple definitions but would like a good solution that must be available.
When using multiple programs with the same name in multiple projects of the 2017 Visual Studio I get "Class pgmname has multiple definitions". I've tried using a common location but that results in "resource in use". Just for testing purposes I've renamed the programs with variations of the name to avoid the multiple definitions but would like a good solution that must be available.
One solution to this might be to specify a different default namespace for each project, which can be done by specifying the ILNAMESPACE directive in the additional directives box for the project (under the COBOL tab of project properties). In this case, references to a program name within a given project will be resolved to the instance within that same project, if it exists.
Note that this use of the ILNAMESPACE directive is different from the namespace specified in the 'Default namespace' box of the Application tab. The latter is used when adding new items to the project and, if set to 'MicroFocus' for example, results in e.g.:
program-id. Program1 as "MicroFocus.Program1".
i.e. in this case the namespace is explicitly embedded into the syntax of the program.
The presence of the ILNAMESPACE directive when adding new items to a project (with default namespace) may lead to unexpected results, e.g. the doubling up of the namespace in the class name.
When using multiple programs with the same name in multiple projects of the 2017 Visual Studio I get "Class pgmname has multiple definitions". I've tried using a common location but that results in "resource in use". Just for testing purposes I've renamed the programs with variations of the name to avoid the multiple definitions but would like a good solution that must be available.
When using multiple programs with the same name in multiple projects of the 2017 Visual Studio I get "Class pgmname has multiple definitions". I've tried using a common location but that results in "resource in use". Just for testing purposes I've renamed the programs with variations of the name to avoid the multiple definitions but would like a good solution that must be available.
When using multiple programs with the same name in multiple projects of the 2017 Visual Studio I get "Class pgmname has multiple definitions". I've tried using a common location but that results in "resource in use". Just for testing purposes I've renamed the programs with variations of the name to avoid the multiple definitions but would like a good solution that must be available.
When using multiple programs with the same name in multiple projects of the 2017 Visual Studio I get "Class pgmname has multiple definitions". I've tried using a common location but that results in "resource in use". Just for testing purposes I've renamed the programs with variations of the name to avoid the multiple definitions but would like a good solution that must be available.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.