PDA

View Full Version : Error compiling Cpw basic_template program.



jpummill
02-20-2002, 05:18 PM
I finally figured this one out on my own but thought others could use some assistance.

When compiling the basic_template from Cpw, I kept getting the following error:

error C2894: templates cannot be declared to have 'C' linkage
Error executing cl.exe.

I finally found on Google, an email discussing this problem. It seems that VC++ V6 does not like spaces in its install path such as "Program Files".

The work around was to add include entries directly to the source file. I put "#include <math.h>" in basic_template.c and the program finally compiled.

If anyone has a better solution, I would love to hear it.

jpummill

jmathies
02-20-2002, 08:15 PM
Someone else had a problem with this. The version that was up on the site for the last week or so had math.h included in cpw_config.h. The current version upped this
afternoon has math.h included in the file it's used in, cpw_image.c. This seems to have fixed the problem.

Regards,
Jim