Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Error compiling Cpw basic_template program.

  1. #1
    Intern Contributor
    Join Date
    Dec 2001
    Posts
    91

    Error compiling Cpw basic_template program.

    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

  2. #2
    Junior Member Regular Contributor
    Join Date
    Feb 2002
    Posts
    133

    Re: Error compiling Cpw basic_template program.

    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
    --
    Jim Mathies http://www.mathies.com/

    \"The best way to predict the future is to invent it."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •