-
warning LNK4084 ???????
hey im making a simple 2d sprite game using a single buffer, and an algorithm which loads the levels from bitmap to an object array, it all works fine on windows me but returns the warning:
warning LNK4084: total image size 832401408 exceeds max (268435456);
i have just re-installed windows xp and now when i try to run my same app it doesnt run due to this causing a win32 error,
i have checked to see if the composite value of images does exceed 256mb(on the off chance it did) but nope it was only 9.6mb, i then thought it may be because of constant 9999 sized arays so i set them all to 999 and recompiled the app the same warning + error is returned even the total image size bit is the same, so i tried removing the bitmap loading and sprite loading bits, the erorr is the same and the size is still the same, ca anyone help me plz?
-
>>> ca anyone help me plz?
Not with the given info. You could try to dynamically allocate your arrays rather than statically. Post your code/resources/headers/files, (you can zip them together and post a .zip), and perhaps someone will have time to look at it, I can't promise, I'm a biit busy at the moment.
-
adrianxw is very correct. Looking at *just* the static integer arrays in EGAMMING.cpp, you're declaring over 763 megs.
That is, 9999 integers @ 4 bytes/integer * 12 integer arrays = 479952 bytes = 468 kilobytes = 0.46 meg, which isn't bad. However, then come the two two-dimensional arrays:
9999 * 9999 integers @ 4 bytes/integer * 2 integer arrays = 799840008 bytes = 781093 kilobytes = 762.79 meg, which is why the linker is complaining.
Dynamic allocation won't help much; you might want to reconsider your graphics code. For starters, why would you need more than a couple bitmap handles or so many sprite position markers?
-
lol sorted it just before i was re checking this thread, yep u are right, the two dimensional array was the prob, i was using this array as to cover every x,y coordinate possible for the use of the object array, and ur right again i dont realy need this huge array, but i used it just in the off chance that someone wanted a huge dc, i was eventually aiming at making a program which creates small 2d games based on 2 bitmaps so this is the main reason i wanted this huge array, but ahwell, ive changed it to [999][999] which covers just enough for the next thing i wanted to do thanx for the help!! btw does anyone know why win NT versions dont allow this but 9x & ME versions do??
-
The 32 bit NT core is a far better OS than the 16/32 bit 9x cores, things you were "getting away with" in the poor systems were correctly trapped in the professional environment.
>>> Looking at *just* the static integer arrays in EGAMMING.cpp,
Where did you see that, I can't see any code?
-
lol sorry after i got it working i removed the file ^_^ thanx for your help