Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Puzzler183

Gah GLUT 2.0

This topic is 5406 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

OK, I''m using Dev-C++ for all of this, so here''s the deal. I got the xmission GLUT, and in the zip there was glut.h which I moved to the includes/gl/ folder. I was about to move the glut32.lib to the lib/ directory, when I noticed that all the files in there had the .a extension. And as luck may have it, there was a libglut32.a and a libglut.a (all the files has lib at the beginning). I didn''t know what to do with DEF file (I am assume the latter may be the problem) so I left it be. I also moved the dll to C:\windows\system32\ and C:\windows\system. My code is:
#include <iostream.h>
#include <gl/glut.h>

int main()
{
     cout << GLUT_LEFT_BUTTON << "\n";
     cout << GLUT_MIDDLE_BUTTON << "\n";
     cout << GLUT_RIGHT_BUTTON << "\n";
     cout << GLUT_UP << "\n";
     cout << GLUT_DOWN << "\n";
     return 0;
}
   
And I changed my linker options to reflect how it said I should do it with the other OpenGL libraries: -libopengl32 -llibglut32 I then tried to compile, and got: [Linker error] undefined reference to `__glutInitWithExit'' [Linker error] undefined reference to `__glutCreateWindowWithExit'' [Linker error] undefined reference to `__glutCreateMenuWithExit'' I really don''t know what''s going on there although I''m assuming it has something to do with that DEF file or my libglut32.a file missing functions... So do anyone have any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Thanks for that, but even after changing it to:

-lopengl32 -lglut32

I still get the same three errors...:/ If you have any other ideas, let me know...

Share this post


Link to post
Share on other sites
Ugh...I dream of the day people will stop asking about linker errors...

project->project options->parameters->add library or object

Find the glut library and add it.

Share this post


Link to post
Share on other sites
That will be the day when people stop answering without reading the whole question.

He's not using MSVC.

Puzzler - have you tried rebuilding the lib from source ?

C++Note - you shouldn't use <iostream.h> but <iostream>, along with std::cout and std::endl.



[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]


[edited by - Fruny on September 1, 2003 1:52:58 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Fruny
C++Note - you shouldn''t use but , along with std::cout and std::endl.




Dev-C++ didn''t like that when I did it, and this is just a little temp test so meh. I''ll try rebuilding the lib I guess, although I''m thinking I''ll just find another place to download it and try again.

Share this post


Link to post
Share on other sites
quote:
Original post by Puzzler183
Dev-C++ didn''t like that when I did it, and this is just a little temp test so meh. I''ll try rebuilding the lib I guess, although I''m thinking I''ll just find another place to download it and try again.



Fair enough. Good luck.


[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]

Share this post


Link to post
Share on other sites
I''m starting to think it''s Dev-C++. I just noticed that including NO libs gives me the same errors. I think it''s time for a reinstall...

Share this post


Link to post
Share on other sites
quote:
Original post by Fruny
That will be the day when people stop answering without reading the whole question.

He''s not using MSVC.

Puzzler - have you tried rebuilding the lib from source ?

C++Note - you shouldn''t use but , along with std::cout and std::endl.
I read every last word. The steps I gave are the steps to link a library in Dev-CPP.

Share this post


Link to post
Share on other sites
quote:
Original post by Raloth
quote:
Original post by Fruny
That will be the day when people stop answering without reading the whole question.

He''s not using MSVC.

Puzzler - have you tried rebuilding the lib from source ?

C++Note - you shouldn''t use but , along with std::cout and std::endl.
I read every last word. The steps I gave are the steps to link a library in Dev-CPP.



I''m not building a project; I''m building a single file... Anyway, I''m in the process of reinstalled Dev-C++ and heck, I''ll get a newer better version so it''s all good.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!