Solved

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

Posted on 2004-10-07
5
1,178 Views
Last Modified: 2008-03-10
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
Comment
Question by:nickypp
  • 2
  • 2
5 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 12253705
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
 

Author Comment

by:nickypp
ID: 12253720
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
 
LVL 30

Expert Comment

by:Axter
ID: 12253849
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
 

Author Comment

by:nickypp
ID: 12253867
using a *.cpp file.
0
 
LVL 17

Accepted Solution

by:
mokule earned 500 total points
ID: 12253892
Hi,
I've commented out this line from glut.h
extern _CRTIMP void __cdecl exit(int);
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question