ncgen from within c code

Anyone know if I can call ncgen during run time to create a 
netcdf file.

I want the  user to be able to update the database structure
for future nc files as new info becomes available.  I figure
it will simpler to update the cdl files, than bother with my 
c code.

Thanks,

Daniel Teyf
teyf@xxxxxxxxxxxxxxxxx                          NOAA - ETL