News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Glut and wxWidgets together in a project

Started by ozgurgerilla, September 01, 2009, 12:31:47 PM

Previous topic - Next topic

ozgurgerilla

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.

Jenna

Quote from: ozgurgerilla 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.
Yes, your setup is not correct.

ozgurgerilla

Quote from: jens on September 01, 2009, 12:47:37 PM
Quote from: ozgurgerilla 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.
Yes, your setup is not correct.

Hi,

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

regards,
O.

oBFusCATed

(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!]

ozgurgerilla

Quote from: oBFusCATed 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

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.

oBFusCATed

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!]

ozgurgerilla

Quote from: oBFusCATed 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.


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.

oBFusCATed

Quote from: ozgurgerilla on September 02, 2009, 12:27:56 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!]

ozgurgerilla

Quote from: oBFusCATed on September 02, 2009, 12:44:48 PM
Quote from: ozgurgerilla on September 02, 2009, 12:27:56 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:

typedef unsigned short wchar_t;

but I have no variable named wchar_t


Regards,
GERILLA.

oBFusCATed

Trying google I've found this:
http://forums.next.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!]

ozgurgerilla

Quote from: oBFusCATed on September 02, 2009, 07:41:06 PM
Trying google I've found this:
http://forums.next.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.

oBFusCATed

This was what I typed in google:

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!]