Author Topic: Linker Error: ../lib32/libpthread.a: file not recognized: file format not recogn  (Read 4862 times)

rrb011270

  • Guest
I am getting a linker error for my C/C++ project. See build logs.

Code

-------------- Clean: Debug in RTYclientService_winnt_codeblocks (compiler: GNU GCC Compiler)---------------

Cleaned "RTYclientService_winnt_codeblocks - Debug"

-------------- Build: Debug in RTYclientService_winnt_codeblocks (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\RTYclientService.cpp" -o obj\Debug\Src\RTYclientService.o
g++.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\Jzon\Jzon.cpp" -o obj\Debug\Src\Source\Jzon\Jzon.o
gcc.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\LogR\Logr.c" -o obj\Debug\Src\Source\LogR\Logr.o
gcc.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\Queue\Queue.c" -o obj\Debug\Src\Source\Queue\Queue.o
C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\Queue\Queue.c: In function 'queue_thread_main':
C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\Queue\Queue.c:274:27: warning: variable 'ErrCode' set but not used [-Wunused-but-set-variable]
  274 |     register ERROR_STATUS ErrCode;
      |                           ^~~~~~~
g++.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\SimpleJSON\JSON.cpp" -o obj\Debug\Src\Source\SimpleJSON\JSON.o
g++.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\SimpleJSON\JSONValue.cpp" -o obj\Debug\Src\Source\SimpleJSON\JSONValue.o
gcc.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\Socket\Cstomp.c" -o obj\Debug\Src\Source\Socket\Cstomp.o
g++.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\Socket\Tcplistener.cpp" -o obj\Debug\Src\Source\Socket\Tcplistener.o
gcc.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\Stomp\err_r.c" -o obj\Debug\Src\Source\Stomp\err_r.o
gcc.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\Stomp\frame.c" -o obj\Debug\Src\Source\Stomp\frame.o
gcc.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\Stomp\hdr.c" -o obj\Debug\Src\Source\Stomp\hdr.o
gcc.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\Stomp\stomp.c" -o obj\Debug\Src\Source\Stomp\stomp.o
gcc.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\Utility\Utility.c" -o obj\Debug\Src\Source\Utility\Utility.o
gcc.exe -Wall -fexceptions -m32 -g -D__DEBUG__ -D__WINNT4__ -I..\Src\Include -c "C:\Documents and Settings\Admin\My Documents\ANSI_Cpp\RTYclientService_v4\Src\Source\WinRegistry\WinRegistry.c" -o obj\Debug\Src\Source\WinRegistry\WinRegistry.o
g++.exe  -o bin\Debug\RTYclientService_winnt_codeblocks.exe obj\Debug\Src\RTYclientService.o obj\Debug\Src\Source\Jzon\Jzon.o obj\Debug\Src\Source\LogR\Logr.o obj\Debug\Src\Source\Queue\Queue.o obj\Debug\Src\Source\SimpleJSON\JSON.o obj\Debug\Src\Source\SimpleJSON\JSONValue.o obj\Debug\Src\Source\Socket\Cstomp.o obj\Debug\Src\Source\Socket\Tcplistener.o obj\Debug\Src\Source\Stomp\err_r.o obj\Debug\Src\Source\Stomp\frame.o obj\Debug\Src\Source\Stomp\hdr.o obj\Debug\Src\Source\Stomp\stomp.o obj\Debug\Src\Source\Utility\Utility.o obj\Debug\Src\Source\WinRegistry\WinRegistry.o  -m32 -lpthread -lws2_32 
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/lib/../lib32/libpthread.a: file not recognized: file format not recognized
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 19 second(s))
1 error(s), 1 warning(s) (0 minute(s), 19 second(s))
 


Hope you can help me and thank you in advance.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Are you sure this version of the compiler supports pthread?
(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!]