Author Topic: Problem with building program  (Read 4677 times)

malkolm

  • Guest
Problem with building program
« on: December 26, 2010, 04:57:28 pm »
Hello everyone,

I was hoping someone could help me with problem I've been having.

When I try compile my program, I got following:

Build log:

C:\MinGW\lib/libmingw32.a(tlsthrd.o):tlsthrd.c:(.text+0x1e7): undefined reference to `EnterCriticalSection@4'
C:\MinGW\lib/libmingw32.a(tlsthrd.o):tlsthrd.c:(.text+0x204): undefined reference to `LeaveCriticalSection@4'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
11 errors, 0 warnings
 
« Last Edit: December 26, 2010, 04:59:32 pm by malkolm »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Problem with building program
« Reply #1 on: December 26, 2010, 07:17:57 pm »
C:\MinGW\lib/libmingw32.a(tlsthrd.o):tlsthrd.c:(.text+0x1e7): undefined reference to `EnterCriticalSection@4'
http://lmgtfy.com/?q=undefined+reference+to+EnterCriticalSection

...the 4th link (located at microsoft.com) gives the full answer.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ