Author Topic: Glut and wxWidgets together in a project  (Read 8686 times)

Offline ozgurgerilla

  • Single posting newcomer
  • *
  • Posts: 9
Glut and wxWidgets together in a project
« on: September 01, 2009, 12:31:47 pm »
Hi All,

I am working on a project that uses both glut and wxwidgets. I can make and compile a glut project on its own and wxwiwdgets but if I try to use both on the same project it doesn't work. Any ideas?


Regards,
GERILLA.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Glut and wxWidgets together in a project
« Reply #1 on: September 01, 2009, 12:47:37 pm »
Hi All,

I am working on a project that uses both glut and wxwidgets. I can make and compile a glut project on its own and wxwiwdgets but if I try to use both on the same project it doesn't work. Any ideas?


Regards,
GERILLA.
Yes, your setup is not correct.

Offline ozgurgerilla

  • Single posting newcomer
  • *
  • Posts: 9
Re: Glut and wxWidgets together in a project
« Reply #2 on: September 01, 2009, 12:52:21 pm »
Hi All,

I am working on a project that uses both glut and wxwidgets. I can make and compile a glut project on its own and wxwiwdgets but if I try to use both on the same project it doesn't work. Any ideas?


Regards,
GERILLA.
Yes, your setup is not correct.

Hi,

thanks for the help. do you know how I can sort that out?

regards,
O.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Glut and wxWidgets together in a project
« Reply #3 on: September 01, 2009, 03:11:46 pm »
Reading the FAQ maybe?
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

And if you can't find the problem in the output, paste it here
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ozgurgerilla

  • Single posting newcomer
  • *
  • Posts: 9
Re: Glut and wxWidgets together in a project
« Reply #4 on: September 01, 2009, 03:35:13 pm »
Reading the FAQ maybe?
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

And if you can't find the problem in the output, paste it here

Couldn't find the problem there. what I have is a glut project working well in code::blocks and now I need to use wxWidgets. I try using the header but it cannot find it. it gives me this error

...wx/wxprec.h: No such file or directory
...wx/wx.h: No such file or directory

but when I do file>new>project and select wxwidgets wizard, then wxwidgets works perfectly alone but not with glut. could you please tell me how to use it together?

regards,
O.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Glut and wxWidgets together in a project
« Reply #5 on: September 01, 2009, 04:56:36 pm »
Ah, you have to setup you project manually.

I think it will be easier to create wx project, than make it use glut by copying options from a working glut project.

The project templates are made to ease the creation of common projects, your is not such.
In order to succeed you need to understand how compiling works (include dirs, compiler options, lib dirs, linker options), but I don't know where (except google) you can find that information.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ozgurgerilla

  • Single posting newcomer
  • *
  • Posts: 9
Re: Glut and wxWidgets together in a project
« Reply #6 on: September 02, 2009, 12:27:56 pm »
Ah, you have to setup you project manually.

I think it will be easier to create wx project, than make it use glut by copying options from a working glut project.

The project templates are made to ease the creation of common projects, your is not such.
In order to succeed you need to understand how compiling works (include dirs, compiler options, lib dirs, linker options), but I don't know where (except google) you can find that information.


I've checked all include dirs, compiler options, lib dirs, linker options and they are all the same; wxwidgets seems to work but GLUT doesn't. If you could find something please post it because I am stuck with DevC++ 4.x and wxWidgets 2.6.0, I can't even use the super awesome wxAUI! lol


Regards,
Ozgur.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Glut and wxWidgets together in a project
« Reply #7 on: September 02, 2009, 12:44:48 pm »
... wxwidgets seems to work but GLUT doesn't. ...

What does that mean? The compiler/linker has told you what is the problem, you just need to decipher it!
That's why I told you to enable full logging, so you can see how the compiler/linker is run (what options are passed to it).
And if you know the required options you would know what is missing...


p.s. if you can't fix you problem you could post the full log here, so someone could spot the problem...

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ozgurgerilla

  • Single posting newcomer
  • *
  • Posts: 9
Re: Glut and wxWidgets together in a project
« Reply #8 on: September 02, 2009, 07:18:42 pm »
... wxwidgets seems to work but GLUT doesn't. ...

What does that mean? The compiler/linker has told you what is the problem, you just need to decipher it!
That's why I told you to enable full logging, so you can see how the compiler/linker is run (what options are passed to it).
And if you know the required options you would know what is missing...


p.s. if you can't fix you problem you could post the full log here, so someone could spot the problem...



Hi,
There is an error and 7 warnings, the error is:

error: redeclaration of C++ built-in type `short'

it says how this line in glut.h is redeclared:

Code
typedef unsigned short wchar_t;

but I have no variable named wchar_t


Regards,
GERILLA.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Glut and wxWidgets together in a project
« Reply #9 on: September 02, 2009, 07:41:06 pm »
Trying google I've found this:
http://forums.codeblocks.org/index.php?topic=1000.msg6876

p.s. I've not read the whole topic, but I should have some clues what is needed...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ozgurgerilla

  • Single posting newcomer
  • *
  • Posts: 9
Re: Glut and wxWidgets together in a project
« Reply #10 on: September 04, 2009, 03:27:03 pm »
Trying google I've found this:
http://forums.codeblocks.org/index.php?topic=1000.msg6876

p.s. I've not read the whole topic, but I should have some clues what is needed...


hey mate great link, thank you very much. how do you go about finding relevant sites, is it a correct use of google search? most I know is quotes and good use of words is there any other tricks?


regards,
GERILLA.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Glut and wxWidgets together in a project
« Reply #11 on: September 04, 2009, 05:41:18 pm »
This was what I typed in google:
Code
error: redeclaration of C++ built-in type `short'

It was first non-ad result  8)

Searching for the exact message of the error helps 99% of the time :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]