News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Problem with building program

Started by malkolm, December 26, 2010, 04:57:28 PM

Previous topic - Next topic

malkolm

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


MortenMacFly

Quote from: malkolm on December 26, 2010, 04:57:28 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]