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,122 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now