Problem
How to setup C and COBOL (Calling C module) projects in Visual COBOL for Eclipse.
Resolution
The following steps can be used to prepare an Eclipse Project to recognise C projects and Source files:
-Install the C/C++ Eclipse plugin via IDE > Help > Install New software > Add 'http://download.eclipse.org/releases/mars'; after that check > Programming languages > C/C++ Development Tools and install these.

-Following that, install and configure the 3rd Party MinGW C compiler to be used by the Eclipse IDE, available at URL: https://sourceforge.net/projects/mingw/files/
-For the MinGW compiler you may have to set the Windows PATH environment variable (at SYSTEM level) to point the MinCW compiler e.g. as set here:

-Install the additional MinGW gcc compiler files via Windows command prompt (command: mingw-get install gcc), from location as shown in the above path.
-Create an Eclipse C project (Project Type>Shared Library, ToolChains > MinGW GCC),

-Add your source file e.g. test.c file to this project.
-Right click and choose Build.
-The C .dll module is now built (naming of this module may need to be adjusted according to COBOL Program’s CALL statement):

The following steps are for preparing the COBOL project in Eclipse and relevant source files:
-For the COBOL project, Set that up via File > New > Micro Focus COBOL project. Finish the New Project wizard.
-Once the project is created and a COBOL source file is added that makes a CALL to the C module then proceed to build this project by right clicking on the project name in the COBOL Explorer view.
-To be able to debug these module it may be required to add a Project properties > Micro Focus > Events > post build event entry to copy the compiled .INT COBOL program file over to the C Project output directory, an example is:
copy "C:\\Users\\kimh\\workspace\\CBLTest\\New_Configuration.bin\\CallC.int" "C:\\Users\\kimh\\workspace\\test\\Debug"
-For the COBOL project, create a Run/Debug Configuration, adjusting the “Main Program” area to the path were the copied INT program resides, example as follows:

-Now Execute your COBOL Run/Debug configuration, debug through the code:

View the exported Visual COBOL Eclipse Projects during testing and article.
#SupportTips/KnowledgeDocs
#SupportTips/SupportTips/KnowledgeDocs