loading
 
Anonymous 16 year
I tried running the API in my program in visual c++ express 2008 and Im getting the following errors:
RR_API.obj : error LNK2028: unresolved token (0A00001F) "extern "C" long __stdcall SetBitmapBits(struct HBITMAP__ *,unsigned long,void const *)" (?SetBitmapBits@@$$J212YGJPAUHBITMAP__@@KPBX@Z) referenced in function "public: struct HBITMAP__ * __clrcall RR_API::getBitmap(char *,unsigned char *,int *,int *,unsigned int)" (?getBitmap@RR_API@@$$FQAMPAUHBITMAP__@@PADPAEPAH2I@Z)
1>RR_API.obj : error LNK2028: unresolved token (0A000020) "extern "C" struct HBITMAP__ * __stdcall CreateDIBSection(struct HDC__ *,struct tagBITMAPINFO const *,unsigned int,void * *,void *,unsigned long)" (?CreateDIBSection@@$$J224YGPAUHBITMAP__@@PAUHDC__@@PBUtagBITMAPINFO@@IPAPAXPAXK@Z) referenced in function "public: struct HBITMAP__ * __clrcall RR_API::getBitmap(char *,unsigned char *,int *,int *,unsigned int)" (?getBitmap@RR_API@@$$FQAMPAUHBITMAP__@@PADPAEPAH2I@Z)
1>RR_API.obj : error LNK2019: unresolved external symbol "extern "C" long __stdcall SetBitmapBits(struct HBITMAP__ *,unsigned long,void const *)" (?SetBitmapBits@@$$J212YGJPAUHBITMAP__@@KPBX@Z) referenced in function "public: struct HBITMAP__ * __clrcall RR_API::getBitmap(char *,unsigned char *,int *,int *,unsigned int)" (?getBitmap@RR_API@@$$FQAMPAUHBITMAP__@@PADPAEPAH2I@Z)
1>RR_API.obj : error LNK2019: unresolved external symbol "extern "C" struct HBITMAP__ * __stdcall CreateDIBSection(struct HDC__ *,struct tagBITMAPINFO const *,unsigned int,void * *,void *,unsigned long)" (?CreateDIBSection@@$$J224YGPAUHBITMAP__@@PAUHDC__@@PBUtagBITMAPINFO@@IPAPAXPAXK@Z) referenced in function "public: struct HBITMAP__ * __clrcall RR_API::getBitmap(char *,unsigned char *,int *,int *,unsigned int)" (?getBitmap@RR_API@@$$FQAMPAUHBITMAP__@@PADPAEPAH2I@Z)
1>
does anyone know how to fix this?
Anonymous 16 year
I took out the getBitmap code in the RR_API.cpp file and the errors dont come up anymore, does anyone know what the problem could be in the getBitmap coding?
Anonymous 16 year
The API compiles as is in VC8.0 with the include main program. The GetBitmap routine needs several windows based functions that you should remove if you are working with the API on a different platform.

If you want to use the GetBitmap and are working on windows be sure to include the first parts of main.cpp (the example API usage file) at the top. Namely:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "RR_API.h"

#pragma comment(lib, "ws2_32.lib")

and you might also need

#include <Windows.h>

in there too.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index