Code::Blocks

User forums => Help => Topic started by: mercury83 on September 07, 2009, 08:13:58 pm

Title: GLFW in CodeBlocks
Post by: mercury83 on September 07, 2009, 08:13:58 pm
Hi

I follow the instructions to use GLFW in CodeBlocks but when I finish all the process of compilation, installation and building, it gives a build error. Ive even deleted and reinstalled Codeblocks to repeat the process (and Im a XP user :D).

The following error shows up in the build log:

mingw32-g++.exe -Wall -fexceptions  -g     -c "E:\Mis documentos\INFORMATICA GESTION\3er CURSO\PRG\P0\Práctica 0\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe: installation problem, cannot exec `as': Invalid argument
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings


Now, I think it could be this thing that appears during compilation:

win32_time.c: In function `_glfwInitTimer':
win32_time.c:556: warning: dereferencing type-punned pointer will break strict-aliasing rules
win32_time.c:556: warning: dereferencing type-punned pointer will break strict-aliasing rules
win32_time.c:563: warning: dereferencing type-punned pointer will break strict-aliasing rules
win32_time.c:563: warning: dereferencing type-punned pointer will break strict-aliasing rules
win32_time.c:574: warning: dereferencing type-punned pointer will break strict-aliasing rules
win32_time.c:574: warning: dereferencing type-punned pointer will break strict-aliasing rules
win32_time.c:583: warning: dereferencing type-punned pointer will break strict-aliasing rules
win32_time.c:583: warning: dereferencing type-punned pointer will break strict-aliasing rules
win32_time.c: In function `_glfwPlatformGetTime':
win32_time.c:621: warning: dereferencing type-punned pointer will break strict-aliasing rules
win32_time.c:621: warning: dereferencing type-punned pointer will break strict-aliasing rules
win32_time.c: In function `_glfwPlatformSetTime':
win32_time.c:650: warning: dereferencing type-punned pointer will break strict-aliasing rules
win32_time.c:650: warning: dereferencing type-punned pointer will break strict-aliasing rules


...


C:\Archivos de programa\CodeBlocks\Open GL GLFW>win32_time.c: In function `_glfwInitTimer':
"win32_time.c:" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

C:\Archivos de programa\CodeBlocks\Open GL GLFW>win32_time.c:556: warning: dereferencing type-punned
 pointer will break strict-aliasing rules
El nombre de archivo, directorio o etiqueta del volumen no es válido.

etc


Any idea?

THANK YOU!
Title: Re: GLFW in CodeBlocks
Post by: MortenMacFly on September 07, 2009, 08:29:24 pm
mingw32-g++.exe: installation problem, cannot exec `as': Invalid argument
According to this:
http://www.otter-rsch.ca/phpbb/viewtopic.php?p=555
...you might want to try a more recent GCC.

However - to telly ou some more you should at least state what version of C::B, what compiler version on what platform you are using.

Deleting the config file might work, too (in case your setup got broken for any strange reason that should actually not happen).
Title: Re: GLFW in CodeBlocks
Post by: jens on September 07, 2009, 10:31:02 pm
Please do not start two (or more) threads (http://forums.codeblocks.org/index.php/topic,11129.msg75892.html#msg75892) about the same issue.

If no one answers a thread, it might be that nobody has an idea how to solve the issue, or people who know the problem just did not read it, or the post lacks information about the problem.

In any case it's better to "bump" the first thread, but please don't do it after one or two hours as it sometimes happens.
Title: Re: GLFW in CodeBlocks
Post by: mercury83 on September 08, 2009, 09:26:15 am
I'm using the version 8.02 of CB and Windows XP.

Where can I find the compiler's version?

Where can I find the newest versions of the GCC compiler?
And how would I I install it?

And what config file do you mean?


Thank you very much for your answer!

Title: Re: GLFW in CodeBlocks
Post by: Seronis on September 08, 2009, 03:35:43 pm
I'm using the version 8.02 of CB and Windows XP.

Where can I find the compiler's version?
start -> run -> cmd
type  'gcc -v'

Where can I find the newest versions of the GCC compiler?
And how would I I install it?
http://www.tdragon.net/recentgcc/
Title: Re: GLFW in CodeBlocks
Post by: jens on September 08, 2009, 03:44:21 pm
Please don't use TDragons gcc4.4.1 at the moment it has a known bug.
You can manual download the 4.4.0 files from http://sourceforge.net/projects/tdm-gcc/files/ (http://sourceforge.net/projects/tdm-gcc/files/).
Have a look here to see what you need: http://forums.codeblocks.org/index.php/topic,11148.msg76009.html#msg76009 (http://forums.codeblocks.org/index.php/topic,11148.msg76009.html#msg76009) .
Title: Re: GLFW in CodeBlocks
Post by: mercury83 on September 08, 2009, 08:20:36 pm
My version is 3.4. All the bla bla bla is here:

Configured with: ../gcc-3.4.5/--with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-langu
ages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-e
xceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disa
ble-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx
-debug
Thread model: win32
gcc version 3.4.5 (mingw-vista special)

I've got an old version, so I guess this might be the problem. I'll try.
The current version is 4.4.1, but as is it recommended on the page, I should choose version 4.3.3, isnt it?

Thank you.

Title: Re: GLFW in CodeBlocks
Post by: Seronis on September 08, 2009, 09:01:07 pm
4.4.0 works for me.  I havent tested 4.4.1 and after catching up on the issues regarding it I dont think they effect 4.4.0.  As Jes corrected me above, the 4.4.0 is located at:

http://sourceforge.net/projects/tdm-gcc/files/

Scroll down to  'TDM-GCC 4.4 series'  ->  'Previous Releases'  ->  '4.4.0-tdm-1 (r2) SJLJ'
Title: Re: GLFW in CodeBlocks
Post by: mercury83 on September 09, 2009, 08:38:56 pm
Ok. But a few more things, please.

There's a whole list and I dont know what I really need.
What version should I choose?

w32api-3.13-mingw32-dev.tar.gz      or
gcc-core-4.4.1.tar.bz2            or what


And more important: How do I install it? I mean, if I got v 3.4, how do I update or where should I install the new one and how?

Actually, Im not really sure about what Im doing exactly.
I'm installing an opengl addon to use it with CB, isnt it?.
Ive already done it with Dev. I followed the instructions, I compiled it with its make.exe and it worked fine.

I follow the steps given in http://wiki.codeblocks.org/index.php?title=Using_GLFW_with_Code::Blocks
but its a bit problematic :)

Thank you all for your help.