How to setup linking in a Visual COBOL project so that an entry point defined within a .LIB will be used as the main entry point
Customer is migrating his application from Net Express to Visual COBOL. The application is a mixture of COBOL and C programs where there is a main entry point WinMain that resides within a C library.
Under Net Express they used a makefile to call the system linker directly in order to link this so that the C WinMain would be the main entry point and the COBOL objects would be alternate entry points.
The customer now wishes to compile and link this in the same manner but using a Visual COBOL project to do the build instead of a makefile.
The program builds and links OK but it is not picking up the WinMain in the C .LIB as the main entry point so it does not start correctly.
When they try to specify WinMain as the entry point on the COBOL Link tab of the project properties it gives them an error that this entry point cannot be found.
How can they use this link scenario from within a Visual COBOL project?
Add the following to the additional directives on the bottom of the COBOL Link Property page.
This tells the linker to force the main entry point to be the name specified so that it will search all .LIBs for that name.