Firstly I downloaded the cvs so i should have the latest versions of the openxdk files.
I just got a problem with bitmaps. I got this piece of code from a tutorial on the net and the guy who i presume wrote it seems to have no trouble. I can compile other programs fine. Just not any with bitmaps.
Heres the code...
// This demo code is referenced from one of the openxdk samples on
// sourceforge - caustik
#include <xgfx2d/bitmap.h> // Bitmap*, get_screen_bitmap()..
// Program Entry Point
vga_init_mode(MODE_320x240x32); // Init screen render surface
Bitmap *screen = get_screen_bitmap();
int xx, y, x;
vga_vsync(); // Wait for Vertical Blank
vga_flip(); // Flip
//generate a pretty colour background on the screen
uint32 *p = screen->data;
for (y=0; y<screen->h; y++)
for (x=0; x<screen->w; x++)
*p++ = ((x+xx)^y)&0xFF; //yay a XOR pattern!!! :D
When i try to compile it i get...
------ Build started: Project: OpenXDKBlank, Configuration: Release Win32 ------
d:\programming\oxdk projects\3d play\main.cpp(32) : warning C4700: local variable 'xx' used without having been initialized
main.obj : error LNK2019: unresolved external symbol _get_screen_bitmap referenced in function _XBoxStartup
Release/OpenXDKBlank.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://d:\Programming\OXDK Projects\3D Play\Release\BuildLog.htm"
OpenXDKBlank - 2 error(s), 1 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped
I just had a thought.
I just started on some code last night and made a class and got a similar error when trying to access a class that i created.
Is there a setting in vs.net that i could have stuffed up to somehow not let me use classes?
I don't have the code for the other stuff im doing as im at work. Sorry.
The function that it cannot find is contained in xgfx2d.lib. Are you sure that it is included in your link statement?
I don't have openxdk with me but i have the openxdk lib folder in the directories section of vs.net options.
Do i also need to put it in the linker->input section under Additional Dependancies?
I will try that. Thanks for teh reply.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.