Author Topic: GLFW in CodeBlocks  (Read 6655 times)

Offline mercury83

  • Single posting newcomer
  • *
  • Posts: 5
GLFW in CodeBlocks
« 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!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: GLFW in CodeBlocks
« Reply #1 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).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: GLFW in CodeBlocks
« Reply #2 on: September 07, 2009, 10:31:02 pm »
Please do not start two (or more) threads 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.

Offline mercury83

  • Single posting newcomer
  • *
  • Posts: 5
Re: GLFW in CodeBlocks
« Reply #3 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!


Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: GLFW in CodeBlocks
« Reply #4 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/

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: GLFW in CodeBlocks
« Reply #5 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/.
Have a look here to see what you need: http://forums.codeblocks.org/index.php/topic,11148.msg76009.html#msg76009 .

Offline mercury83

  • Single posting newcomer
  • *
  • Posts: 5
Re: GLFW in CodeBlocks
« Reply #6 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.


Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: GLFW in CodeBlocks
« Reply #7 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'

Offline mercury83

  • Single posting newcomer
  • *
  • Posts: 5
Re: GLFW in CodeBlocks
« Reply #8 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.