Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Compilation and Linking Script

  • Last UpdatedFeb 09, 2023
  • 1 minute read

'C' application programs are best implemented using scripts similar to ccompload, and ‘C++’ with cxxcompload. Script ccompload compiles and links any DARs 'C' application program. The name of the 'C' source file is entered as a command line argument (for example, ccompload c_example.c)

As an alternative, the program may be compiled and linked using a makefile based on the commands in ccompload.

ccompload.bat

@echo off

Rem NT .bat file to compile and link a PDMS DARs application C program.

Rem Argument[1] is the file to be compiled.

if not "%1"=="" goto GOTFILE

echo compload - no filename specified.

goto FINISH

:GOTFILE

Rem Compile and link

cl -Tc%1 -I%PDMSEXE%\dars %PDMSEXE%\dars\d3lib.lib

:FINISH

cxxcompload.bat

@echo off

Rem NT .bat file to compile and link a PDMS DARs application C++ program.

Rem Argument[1] is the file to be compiled.

if not "%1"=="" goto GOTFILE

echo compload - no filename specified.

goto FINISH

:GOTFILE

Rem Compile and link

cl -Tp%1 -I%PDMSEXE%\dars %PDMSEXE%\dars\d3lib.lib

:FINISH

Related Links
TitleResults for “How to create a CRG?”Also Available in