Jump to content
  • Advertisement
Sign in to follow this  
NeoMaster

hxRender Libraries Fail to Link

This topic is 4740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In my project, whenever I try to use hx blit functions (hxuBlitSimple, hxBlitSurface), I get the following error: hxRender.lib(hxrender.obj) : fatal error LNK1103: debugging information corrupt; recompile module -or- hxUtility.lib(hxutility.obj) : fatal error LNK1103: debugging information corrupt; recompile module I'm using Microsoft Visual C++ 6.0 Professional Edition and the Win32 port of hxRender, if that helps any.

Share this post


Link to post
Share on other sites
Advertisement
You need to either rebuild the libraries your self, or upgrade to visual studio.net

Sorry about that.

A quick fix for now is just to copy all the files from the source directory and copy them to your build directory and add them all to your project, you will have to change some of the paths of the headerfiles though.

Share this post


Link to post
Share on other sites
Thanks! I included the files to build and now there are no errors. Unfortunately, I can't seem to blit without freezing up my application. I'll look into it and see what I can do, for now.

EDIT: Well, now it doesn't crash the app, but it doesn't want to blit. Hmmm...

[Edited by - NeoMaster on May 31, 2005 2:23:43 PM]

Share this post


Link to post
Share on other sites
I'm simply trying to draw an 800 x 600 square of white (from a .png with SDL) at (0,0). Ok, here we go:

int main(int argc, char *argv[])
{
bool initfull = 0; //Start fullscreen?
FILE *dataread; //Reads in certain options
dataread = fopen("Data\\data.ini", "r");
if(!feof(dataread))
fscanf(dataread, "%d", &initfull);

if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) //Initialize SDL here
{
printf("Unable to init SDL: %s\n", SDL_GetError()); //Error?
exit(1);
}
atexit(SDL_Quit); //Tells to quit SDL on exit.
TTF_Init();
atexit(TTF_Quit); //Teklls to quit SDL_ttf on exit.
InitIcon(); //Initialize the icon so it sets correctly
SDL_WM_SetCaption("SonicNext","icon"); //Set window caption and icon
SDL_WM_SetIcon(icon,NULL); //Make sure the icon shows
screen=SDL_SetVideoMode(800,600,32,SDL_SWSURFACE|SDL_HWACCEL|SDL_RLEACCEL|SDL_ASYNCBLIT);
if ( screen == NULL )
{
printf("Unable to set 800x600 video: %s\n", SDL_GetError()); //Is there an error?
exit(1);
}
if(initfull == 1)
{
o1choice = 1;
ToggleFullscreen(); //Go fullscreen!
}
fclose(dataread);

hxSetupWindow(800, 600);

camera.x=0;
camera.y=0;
camera.w=800;
camera.h=600;

hxSetCameraView(camera);

screenfmt = screen->format; //Set the common pixel format
InitImages(); //Initialize the images
DrawIMG(white,0,0);

return 0;
}

void DrawIMG(SDL_Surface *img, int x, int y) //First draw function. Takes 3 parameters
{
int q = 0, w = 0, e=0;
hxSurface *image;
hxRect dest;
hxRect dest2;
image = hxsCopySDL(img);
dest.x = 0;
dest.y = 0;
dest.w = image->w;
dest.h = image->h;
dest2.x = x;
dest2.y = y;
dest2.w = image->w;
dest2.h = image->h;
q = SDL_GetTicks();
while(e < 5000)
{
w = SDL_GetTicks();
e = w-q;
hxBlitSurface(image, dest, dest2);
}
}

Share this post


Link to post
Share on other sites
biggest thing, you will never see the image because you never call hxsUpdateWindow.

second of all, where is your event loop! no offense, but between that and the timing function being called internaly from your image blitting routine, your code makes me cringe.

no offense, i'm sure you are new at all this, with much to learn. But I hope this helped.

Share this post


Link to post
Share on other sites
Well, I looked through the documentation a few times for an update screen surface/window and even though it was right there, I missed it! I tried that (hxsUpdateWindow), but I'm still getting a black screen and that's all. I'm going to start a new workspace to try different things that won't be screwed up by other dependencies on specific SDL stuff in my project.

Oh, and about the code, no worries. In the WORKING SDL version of my project, I have an event loop and timing is handled there. I just isolated my blit function and internalized all of the timing to get it working with hxRender first in the code sample above. I only have about a year of C/CPP under my belt, but I know the basics pretty well. [smile]

Share this post


Link to post
Share on other sites
Houston, we have blitting. Over. Thanks so much for the help. I set up a new workspace and started from scratch. I'll be porting my project over to the new workspace. I'll finally be able to blit at a good framerate on older computers [smile].

Share this post


Link to post
Share on other sites
um... older computers? like how old? FYI, I can barely get it to run at all on my voodoo3. The textures have to be less than 256x256, otherwise they will just be white blocks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!