Linker Error: undefined references
Posted: Wed Dec 20, 2006 12:37 pm
Right, so I'm trying my luck with the first tutorial and after successfully managing to sort out my linker problem number 1) (which turned out to be the same as his) I'm now stuck with problem number 2) and so far couldn't find anything on the forum. I did find quite a lot on google but most of the solutions didn't seem to apply here (or I'm just too bloody nooby to understand the connection, which is more likely )
Anyway, this is the linker error I get:
--------------------Configuration: stuff - Debug--------------------
Linking...
C:\mingw\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: warning: cannot find entry symbol _mainCRTStartup; defaulting to 00401000
C:\mingw\Templates\stuff\Debug\hw.o: In function `main':
C:\mingw\Templates\stuff\hw.cpp:44: undefined reference to `_alloca'
C:\mingw\Templates\stuff\hw.cpp:44: undefined reference to `__main'
collect2: ld returned 1 exit status
stuff.exe - 3 error(s), 0 warning(s)
---
These are my lines 43-45 (loads of comments before that):
43: int main()
44: {
45: IrrlichtDevice *device = createDevice();
Weirdly enough, if I try different parameters in createDevice() it gives me a linker error for line 28(?) in position2d.h which holds this:
position2d(T x, T y) : X(x), Y(y) {};
I somehow got the feeling that there is still something wrong with my libraries but I can't quite put my finger on it...
Any ideas?
Anyway, this is the linker error I get:
--------------------Configuration: stuff - Debug--------------------
Linking...
C:\mingw\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: warning: cannot find entry symbol _mainCRTStartup; defaulting to 00401000
C:\mingw\Templates\stuff\Debug\hw.o: In function `main':
C:\mingw\Templates\stuff\hw.cpp:44: undefined reference to `_alloca'
C:\mingw\Templates\stuff\hw.cpp:44: undefined reference to `__main'
collect2: ld returned 1 exit status
stuff.exe - 3 error(s), 0 warning(s)
---
These are my lines 43-45 (loads of comments before that):
43: int main()
44: {
45: IrrlichtDevice *device = createDevice();
Weirdly enough, if I try different parameters in createDevice() it gives me a linker error for line 28(?) in position2d.h which holds this:
position2d(T x, T y) : X(x), Y(y) {};
I somehow got the feeling that there is still something wrong with my libraries but I can't quite put my finger on it...
Any ideas?