Advertisement

05.15.2008 at 06:25AM PDT, ID: 23404981
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

C++ GLUT Linking

C++ /  Windows / OpenGL

I'm getting unresolved symbol errors when GLUT functions are called.
I am linking the library: #pragma comment (lib, "glut32.lib"),
and I am including the header: #include <gl\glut.h> (IDE Include space - definitely works).

Any ideas?
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: andoneknight
Solution Provided By: Infinity08
Participating Experts: 4
Solution Grade: A
Views: 0
Translate:
Loading Advertisement...
05.15.2008 at 06:39AM PDT, ID: 21573476

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.15.2008 at 06:42AM PDT, ID: 21573508

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.15.2008 at 06:43AM PDT, ID: 21573519

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.15.2008 at 06:53AM PDT, ID: 21573617

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.15.2008 at 07:11AM PDT, ID: 21573798

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.15.2008 at 07:14AM PDT, ID: 21573835

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.15.2008 at 07:22AM PDT, ID: 21573930

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.15.2008 at 08:38AM PDT, ID: 21574834

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.15.2008 at 10:23AM PDT, ID: 21576083

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.15.2008 at 12:59PM PDT, ID: 21577429

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.15.2008 at 02:21PM PDT, ID: 21578089

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.16.2008 at 12:41AM PDT, ID: 21580669

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.16.2008 at 02:12AM PDT, ID: 21581100

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.16.2008 at 02:37AM PDT, ID: 21581269

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.05.2008 at 07:12AM PDT, ID: 21719613

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.05.2008 at 07:15AM PDT, ID: 21719670

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.05.2008 at 07:23AM PDT, ID: 21719767

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.05.2008 at 08:02AM PDT, ID: 21720324

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.05.2008 at 07:54PM PDT, ID: 21725868

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
05.15.2008 at 06:39AM PDT, ID: 21573476

Rank: Genius

>> I'm getting unresolved symbol errors when GLUT functions are called.

Can you show the exact error messages ?
 
05.15.2008 at 06:42AM PDT, ID: 21573508

Rank: Sage

Which symbols are they? Could it be that you have not installed opengl32.lib?
 
05.15.2008 at 06:43AM PDT, ID: 21573519

Rank: Sage

Sorry Infinity08 - browser lag.
 
05.15.2008 at 06:53AM PDT, ID: 21573617
Exact error:

1>Main.obj : error LNK2019: unresolved external symbol _glutCreateMenu@4 referenced in function "void __cdecl MENU_create(void)" (?MENU_create@@YAXXZ)

The rest of the project uses opengl calls and works fine, it's only since (and when I call) GLUT functions.
 
05.15.2008 at 07:11AM PDT, ID: 21573798

Rank: Genius

And how do you call it ?
 
05.15.2008 at 07:14AM PDT, ID: 21573835
void MENU_click(int option) {};

void MENU_create() {
int menu;
menu = glutCreateMenu(MENU_click);
}
 
05.15.2008 at 07:22AM PDT, ID: 21573930

Rank: Genius

Do you use other GLUT functions ? Do they have the same problem ?

Are you sure that the GLUT library is correctly linked (watch the compiler/linker output to see if it's there) ? Is it an up-to-date library version ?
Accepted Solution
 
05.15.2008 at 08:38AM PDT, ID: 21574834

Rank: Sage

> #pragma comment (lib, "glut32.lib")

That ought to get it to link OK, but it is more usual to put the .lib into the Makefile or project. But rather than messing around there, let's see why it isn't linking properly using the pragma.

If you change this to...

#pragma comment (lib, "I_DONT_EXIST_glut32.lib")

...and rebuild, what differences do you see in the build messages, when it links?
 
05.15.2008 at 10:23AM PDT, ID: 21576083

Rank: Genius

Do you have something like

extern "C" {

//...
}

around your #include directives?

'_glutCreateMenu@4' indicates a WINAPI calling convention is being sought by the linker
 
05.15.2008 at 12:59PM PDT, ID: 21577429

Rank: Sage

You usually get...

#ifdef __cplusplus
extern "C" {
#endif

...in the glut.h header itself.
 
05.15.2008 at 02:21PM PDT, ID: 21578089

Rank: Guru

is it one file? if yes, can you post it?

ike
 
05.16.2008 at 12:41AM PDT, ID: 21580669
#pragma comment (lib, "I_DONT_EXIST_glut32.lib") gives a "can't find" error - so it is linking.
I've tried linking it through Visual C++ in project properties, but I have the same problem.

extern "C" is in the glut.h, but below the link to the gl library - the glut header is unchanged and known to work elsewhere, so I wouldn't have thought this would be the problem.

I can't use any GLUT functions no, they all give the same error.

I have the glut32.dll file in my system dir, but when I build the project, glut32.dll is not mentioned in the output window - opengl32.dll and glu32.dll are mentioned and are are linked (or have been) in the same way.
 
05.16.2008 at 02:12AM PDT, ID: 21581100

Rank: Sage

Did you build glut32.lib from source - http://www.xmission.com/~nate/glut/glut-3.7.6-src.zip - or get a binary?
Assisted Solution
 
05.16.2008 at 02:37AM PDT, ID: 21581269

Rank: Genius

>> I can't use any GLUT functions no, they all give the same error.

That means that either the library is not correctly linked (is it linked statically or dynamically btw, since you talk about a DLL ?). Or there is a problem with the library itself.
 
06.05.2008 at 07:12AM PDT, ID: 21719613

Rank: Genius

Did you resolve this problem ? If not, can you answer to my last post ?
 
06.05.2008 at 07:15AM PDT, ID: 21719670
My problem is solved. All I did was redownload the precompiled glut files (which I had redownloaded previously) added them to my project's dir and relinked them.
Unfortunately I do not know what the initial problem was, but perhaps I was paying as much attention as I thought.

Thanks for all suggestions.
 
06.05.2008 at 07:23AM PDT, ID: 21719767

Rank: Genius

That suggests that there was a problem with the library itself (either wrong version or corrupted), which is what was mentioned earlier ... :

http:#21573930 (up-to-date library ?)
http:#21581269 (problem with the library itself ?)

I think rstaveley was also working in that direction ...

Anyway, glad your problem is solved :)
 
06.05.2008 at 08:02AM PDT, ID: 21720324

Rank: Sage

andoneknight, if the responses you got were of no value, by all means go ahead and delete the question, but bear in mind that points are the currency of EE... so cough up! ;-)
 
06.05.2008 at 07:54PM PDT, ID: 21725868
A request (http://www.experts-exchange.com/Q_23460227.html) has been made in Community Support to close this question. If there are no objections, a moderator will finalize this question in approximately 4 days as follows:

Accept expert comment {http:#a21581269}

Please leave any comments here.

Netminder
Site Admin
 
 
20080236-EE-VQP-29 / EE_QW_EXPERT_20070906