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?
Linker Error: undefined references
try to add this .
Code: Select all
int main()
{
IrrlichtDevice *device =
device = irr::createDevice(EDT_DIRECT3D9, core::dimension2d<s32>(1280, 1024), 32, true);
I'm already using those, at least the lib ones. I found out that for some reason the "ignore default startup files" and "ignore all default libraries" options where checked which caused the linker issue.
After it built ok, it wouldn't run and told me it's missing the irrlicht.dll (as you mentioned with the bin). Any idea how to tell the program where to look for the dll?
I got around that problem by copying the dll in the exe's folder, so now at least it's running. Yeay!
Thanks for the help everyone.
After it built ok, it wouldn't run and told me it's missing the irrlicht.dll (as you mentioned with the bin). Any idea how to tell the program where to look for the dll?
I got around that problem by copying the dll in the exe's folder, so now at least it's running. Yeay!
Thanks for the help everyone.