News:

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

Main Menu

Trouble getting freeglut to work on 20.03

Started by Straywind, May 01, 2021, 09:47:23 AM

Previous topic - Next topic

Straywind

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 `SetUnhandledExceptionFilter@4'|
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 `ExitProcess@4'|
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

stahta01

#1
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 ExitProcess@4" 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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]