Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Dev-Cpp, wxWidgets and OpenGL

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Dev-Cpp, wxWidgets and OpenGL
#4009
Posted by: BaKoRaBo 2004-05-04 00:50:14
Hi,

I was wondering, if someone has experience with wxWidgtes and OpenGL with Dev-Cpp. Unfortunately, I can not find any easy code-examples and the only link on wxwidgets.org (about this kind of problem) does not work.

I even can not draw a polygon in a wxGLCanvas.

Bye,
BaKoRaBo
Message2. Re: Dev-Cpp, wxWidgets and OpenGL
#4018
Posted by: upCASE 2004-05-04 14:58:17
Hi!
Did you compile the lib with the needed wxGL #define set to 1 and could you compile any of the OpenGL samples that came with the lib?
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: Dev-Cpp, wxWidgets and OpenGL
#4029
Posted by: 2004-05-05 11:09:34
Okay I'm having that linker error that everyone's getting with opengl in wxwidgets.  I desperately need help getting this to work.  I'm using the latest devpak for devcpp.  It installed fine and i can compile a regular project.  I try to compile the opengl project and i've had success until i get to the linker errors.  I've already posted here in the thread labelled "Linker problem" and am waiting for a response.  I have changed the #define to 1 in setup.h for the wxglcanvas support.  Everyone says to recompile the library for it but i dont know how to do that or what library to recompile.  Any help would be greatly appreciated.

~Adam Giroux
Message4. Re: Dev-Cpp, wxWidgets and OpenGL
#4036
Posted by: upCASE 2004-05-05 15:02:38
Hi!
Just answered to the other thread http://g.yi.org/forum/read.php?13,3514
"I'm using the latest devpak for devcpp" By whom? There's more than one devpack out there and none of the newer ones (including the one I did) are officially supported by the Dev-C++ team or wxWidgets, nor are they hosted on official sites.
I'd really advise you to compile the lib yourself. For a guide on how to do that with version 2.4.2 check out my page at http://www.upcase.de
I've got a little tutorial there. For my devpack (whcih is also located there) I'm not really sure if I added OpenGL support. Currently it's down, but check back tonight as I will upload it again when I'm home.
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message5. Re: Dev-Cpp, wxWidgets and OpenGL
#4041
Posted by: 2004-05-06 04:40:20
Hey again, I've followed your tutorial to a T and I've had a few problems/questions.  #1, where do I put the Rm.exe from the extras.zip file? Does that go in the c:/dev-cpp/bin or the c:/wx/bin?

Beyond that one question, I've done everything on the tutorial and am a bit confused on how I'm supposed to compile this thing using make or mingw32-make.exe when neither file is actually in the c:/wx/src/msw directory which is where your tutorial says to compile from.  As expected, I just get the command not found error.  I've tried just copying files to different places as well just to see what would happen and I make a little progress but eventually run into major errors.  If it helps make things a little clearer, I can't call the gcc --help command from any directory in c:/wx but I can however run it from c:/dev-cpp/bin. 

Anyways, I guess what I'm asking is, what do I do now?  By the way, the tutorial there definitely helped although i had to figure a few things out on my own, like what files %path% variables were in, etc.. I really appreciate the help! Keep up the good work!

~Adam
Message6. Re: Dev-Cpp, wxWidgets and OpenGL
#4044
Posted by: upCASE 2004-05-06 15:17:47
Hi!
Glad my tutorial helped a little and that you decided to do the best you could when you want something you can get as source code: Compile it yourself :)
Trust me: Although you might think that this is pretty confusing and senseless, it will help you to learn something. Whenever somebody tells you again about makefiles and compiling or ./configure, you'll have a clue what he means and how it works. When I started off, I was in your place, that's why I wrote this tutorial...

1. I'd suggest putting rm.exe where all the other /bin stuff like gcc, g++, as, etc. are located. Normally this will be Dev-C++/bin I guess, but I use a different setup with a separate mingw installation.
2. mingw32-make should be located where you just put rm.exe. You will compile in the c:/wx/src/msw directory, but this is not where make has got to be. make only processes makefiles which are located in c:/wx/src/msw.
3."I can't call the gcc --help command from any directory in c:/wx but I can however run it from c:/dev-cpp/bin"
Good and bad. So, gcc is there and we know the dir where it is located. Good!
Bad: Since you can't call it from any other dir it's not in the %PATH%.
To see what directories are in the PATH, switch to the console and type "echo %PATH%". If c:/dev-cpp/bin is not there, that's the problem.
Setting the PATH isn't difficult, but different for Win9x and 2k/XP.
On Win9x: Open autoexec.bat and look for the PATH entry. Enter the new path behind the others like "PATH C:\Windows;MycoolPathhere". Save, restart, try again, be happy :)
On Win 2k/XP: (Hard to comment on that one since I don't know what it's called in english. Using a german version here.) Open the Control panel, go to "System". There should be an "advanced" tab. You'll find a button there, labeled with something a about environment variables. In the next window, look under "system variables" for Path and edit it the way I mentioned for Win 9x. If it's not there, create it.
PATH actually means the "search path". You could also change it temporaly for a single console session by doing PATH=%PATH%;MYDir. After you close the console, the setting is gone. I'd recommend setting the PATH permanently, since you'll need gcc or make from the console sometimes and this makes live easier.

Hope I could clear that up...
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message7. Re: Dev-Cpp, wxWidgets and OpenGL
#4052
Posted by: 2004-05-07 00:14:50
Okay made some serious progress between yesterday and today. I finally realized that i had to set the wxwin and path variables through console.  That was apparently my biggest problem.  I have those set permanently in windows.  You were right by the way, you set those variables through my computer/properties/advanced/evironment variables.  With those set up, I went ahead and followed the tutorial again and was able to successfully compile wxWindows with virtually no problems.  Last night, i had an issue but that was because of some things i changed.  Today, i compiled fresh code and it worked fine.  I went through the command prompt and was able to compile the minimal example as well as the opengl file that i've been desperately trying to get to work!  It ran beautifully with no problems.  Thank you so much!

Now my last problem is getting dev-cpp to work correctly with my newly compiled libraries.  I've included the directories in method one that you recommended and i've(so i thought) added the correct parameters for my project.  Unfortunately I get more compile errors in dev now than i had before.  The parameters you gave don't seem to work for me even when I include -lopengl32 and -lglu32.  I'm going to reinstall dev later on today without the devpaks and see what i can do.  I'm thinking maybe it's getting confused at which file to look for. 

I'll keep ya posted!

~Adam Giroux

P.S.  Where exactly are you from? you usually end up posting while i'm sleeping and your posts say 6pm.  Just being nosey :)  I'm in North Adams, MA, USA.
Message8. Re: Dev-Cpp, wxWidgets and OpenGL
#4054
Posted by: upCASE 2004-05-07 02:49:54
Hi!
Well, there's a pretty big time offset :)
I'm from Germany, Cologne, and normally post in the morning before I start working and drink my first cup of coffee. Second posting in the evening, like now (it's about 20:45).
I hope you got everything to work. I'm afraid that when I updated to 2.5.1 I erased my devpacks. When I find some time I'll compile a 2.5.1 devpack from the latest sources.
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0