• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1303
  • Last Modified:

E2337 Only one of a set of overloaded functions can be "C" at line 146 -- Urgent help required!

Take a simple c++ script, with absolutely nothing in other than the following:

#include <windows>
#include <stdio.h>
#include <GL/glut.h>
#include <GL/gl.h>

int main( )
{
 return 0;
}

RUnning Borland CBuilderX and I want to do some OpenGL using the Glut libraries v3.7
I complile it and get an error specifying " E2337 Only one of a set of overloaded functions can be "C" at line 146" .
I have looked this problem up, but nothing seems to work. Please help! How would I adjust the above code to work, because it is driving me NUTS!!!!!!

Thanks, Nick.
0
nickypp
Asked:
nickypp
  • 2
  • 2
1 Solution
 
AxterCommented:
It should tell you what file it's referring to at line 146.

Also, I notice that your window header file does not have a *.h extension.
#include <windows>

0
 
nickyppAuthor Commented:
Yeah, it still doesn't work even with the *.h. Same error! It is the Glut.h file which is the problem, but how do I go about solving the error?
0
 
AxterCommented:
What type of file is your code in?

Are you using a *.C file or a *.CPP file.

You should be using a *.CPP file.
0
 
nickyppAuthor Commented:
using a *.cpp file.
0
 
mokuleCommented:
Hi,
I've commented out this line from glut.h
extern _CRTIMP void __cdecl exit(int);
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now