Author Topic: Trouble getting freeglut to work on 20.03  (Read 630 times)

Offline Straywind

  • Single posting newcomer
  • *
  • Posts: 2
Trouble getting freeglut to work on 20.03
« on: May 01, 2021, 09:47:23 am »
When attempting to run the codeblocks standard openGL program I get the following errors.

Quote
||=== Build: Debug in shape (compiler: GNU GCC Compiler) ===|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `__dyn_tls_init_callback'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `[email protected]'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `__cpu_features_init'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_fpreset'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_CRT_glob'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `__getmainargs'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_CRT_fmode'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_imp___iob'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_fmode'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_setmode'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_CRT_fmode'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_setmode'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_CRT_fmode'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_setmode'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `__p__fmode'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_fmode'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_pei386_runtime_relocator'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `__p__environ'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_cexit'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `[email protected]'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `signal'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `signal'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `signal'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `signal'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `signal'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| more undefined references to `signal' follow|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_fpreset'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_imp____set_app_type'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_imp____set_app_type'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_imp__atexit'|
C:\TDM-GCC-32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\crt2.o:crt1.c|| undefined reference to `_imp___onexit'|
||error: ld returned 1 exit status|
||=== Build failed: 32 error(s), 0 warning(s) (0 minute(s), 11 second(s)) ===|

It's all french to me, so if anyone is able to point me in the right direction, I would appreciate it

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7130
    • My Best Post
Re: Trouble getting freeglut to work on 20.03
« Reply #1 on: May 01, 2021, 02:35:58 pm »
Look at the "build log" instead of "build messages".

The errors you posted are linking errors, this normally means you are missing a library from the linking settings.

I have no recent experience with GL or freeglut; so, I have no idea what caused the error.

Internet search results on "undefined reference to [email protected]" implies you need to link to kernel32

Edit: Add link to CB Wiki
https://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_My_build_fails_with_multiple_undefined_reference_errors.3F
https://wiki.codeblocks.org/index.php/FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Tim S.
« Last Edit: May 01, 2021, 02:42:53 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org