Code::Blocks/GCC issue

The above is my project, below is the output, the problem is that these are actually implemented/compiled so how is this output even possible? I cannot for the life of me understand what is causing this so now I rely on you guys to help me.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
mingw32-gcc.exe -Wall  -g -DzxDEBUG    -Iinclude  -c C:\Me\Prjs\cpp\zxGUI\main.c -o obj\main.o
mingw32-g++.exe -Lobj  -o bin\zxGUIud.exe obj\main.o obj\src\zx\char\zx_cApp.o
obj\src\zx\char\zx_cDel.o obj\src\zx\char\zx_cGrow.o obj\src\zx\char\zx_cIns.o
obj\src\zx\char\zx_cLen.o obj\src\zx\char\zx_cNew.o obj\src\zx\char\zx_cRem.o
obj\src\zx\char\zx_cShrink.o obj\src\zx\char\zx_InitCHAR.o
obj\src\zx\event\msw\zx_mswKeyD.o obj\src\zx\event\msw\zx_mswTEXTBOX_KeyD.o
obj\src\zx\textbox\zxNewTEXTBOX.o obj\src\zx\wide\zx_InitWIDE.o
obj\src\zx\wide\zx_wApp.o obj\src\zx\wide\zx_wDel.o obj\src\zx\wide\zx_wGrow.o obj\src\zx\wide\zx_wIns.o obj\src\zx\wide\zx_wLen.o obj\src\zx\wide\zx_wNew.o
obj\src\zx\wide\zx_wRem.o obj\src\zx\wide\zx_wShrink.o
obj\src\zx\window\msw\zx_mswGetHWND.o obj\src\zx\window\msw\zx_mswInitATOM.o
obj\src\zx\window\msw\zx_mswInitWNDCLASS.o
obj\src\zx\window\msw\zx_mswInitWNDCLASSEX.o
obj\src\zx\window\msw\zx_mswSetText.o
obj\src\zx\window\zx_InitWINDOW.o
obj\src\zx\window\zx_NewWindow.o obj\src\zx\window\zx_ResizeWindows.o
obj\src\zx\window\zxGetAllWindows.o obj\src\zx\window\zxGetWindowCount.o
obj\src\zx\window\zxNewWINDOW.o     -mwindows
obj\main.o: In function `WinMain@16':
C:/Me/Prjs/cpp/zxGUI/main.c:26: undefined reference to `zx_NewWindow'
C:/Me/Prjs/cpp/zxGUI/main.c:31: undefined reference to `zx_NewWindow'
obj\src\zx\window\zx_NewWindow.o:zx_NewWindow.c:(.data+0x0): undefined reference to `zx_cLen(char const*)'
obj\src\zx\window\zx_NewWindow.o:zx_NewWindow.c:(.data+0x4): undefined reference to `zx_cIns(char**, signed char, signed char, char const*, signed char)'
obj\src\zx\window\zx_NewWindow.o:zx_NewWindow.c:(.data+0x8): undefined reference to `zx_cApp(char**, signed char, signed char, char const*, signed char)'
obj\src\zx\window\zx_NewWindow.o:zx_NewWindow.c:(.data+0xc): undefined reference to `zx_cRem(char*, signed char, signed char, signed char)'
obj\src\zx\window\zx_NewWindow.o:zx_NewWindow.c:(.data+0x10): undefined reference to `zx_cNew(char const*, signed char, signed char)'
obj\src\zx\window\zx_NewWindow.o:zx_NewWindow.c:(.data+0x14): undefined reference to `zx_cGrow(char*, signed char, signed char)'
obj\src\zx\window\zx_NewWindow.o:zx_NewWindow.c:(.data+0x18): undefined reference to `zx_cGrow(char*, signed char, signed char)'
obj\src\zx\window\zx_NewWindow.o:zx_NewWindow.c:(.data+0x1c): undefined reference to `zx_cShrink(char*, signed char, signed char)'
obj\src\zx\window\zx_NewWindow.o:zx_NewWindow.c:(.data+0x20): undefined reference to `zx_cDel(char*)'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
11 errors, 0 warnings (0 minutes, 0 seconds)

Edit: Link removed due to problem being solved.
Last edited on
looks like you're only compiling main.c. What about the rest?
It ALL compiles, that's just GCC's build log. On another note I seem to have solved the problem by getting round to adding the zxC_OPEN/zxC_SHUT statements around all my c89 header stuff, still got a runtime issue but I was aware of that via VS2010
Last edited on
have you linked your libraries?
libraries must be linked in order to compile correctly
There is no longer a compile issue, problem was that I hadn't added the extern "C" {} that explicitly stated that the code was pure C and not C++, once I added that the problem disappeared, additionally the only libraries that needed to be added must've been added automatically by Code::Blocks since I definitely don't get errors regarding that. This project is meant to rely only on c89 & system headers to run, no actual frameworks (because the eventual result will be my own custom framework that I can actually make sense of).
Topic archived. No new replies allowed.