In my ongoing problems with using VC++ .NET to compile my project, I found this function which I cannot get to compile:
TSurface is a CGapiSurface to which I added SetBrightness() and SetContrast().
Under eVC++ everything compiled without a single warning.
I'm linking with gapidraw/lib/xp/gd104.lib. I tried to remove this lib to see if it was indeed linkink, and then I got dozens and dozens of errors. Leaving it in place just generates a few.
I tried to place the gd104.lib in the same directory as the project, and I even re-downloaded GapiDraw1.04 to make sure I had the correct files.
Finally, I checked to make sure I had no other GapiDraw.h, or gd104.lib lying around.
I just can't make it work. On the other hand, every single samples of GapiDraw works flawlessly. I tried to include my own files in one of the sample's project, but still no cigar.
Here are the errors generated:
I don't know where the one on line #7 comes from, I just started to see this one.
Can anyone help? Anyone came across this problem with VC++ .NET?
Thanks...

- Code:
bool TRender::DrawText(const TCHAR *Text, LONG X, LONG Y, TRenderContext Context, TSurface *Surface, LONG OffsetX, LONG OffsetY)
{
// defs
LONG DX,DY,DrawX=0,DrawY=0;
// get surface position
DrawX = X - Context.RenderPort.left;
DrawY = Y - Context.RenderPort.top;
// Set the X,Y position on the destination surface
DX = (DrawX*Display->TileWidth)+OffsetX;
DY = (DrawY*Display->TileHeight)+OffsetY;
// paint this tile on the surface
if(Surface->DrawText(DX,DY,Text,RGB(255,255,255),GDDRAWTEXT_BORDER,NULL,NULL)) return false;
// all went well
return true;
}
TSurface is a CGapiSurface to which I added SetBrightness() and SetContrast().
Under eVC++ everything compiled without a single warning.
I'm linking with gapidraw/lib/xp/gd104.lib. I tried to remove this lib to see if it was indeed linkink, and then I got dozens and dozens of errors. Leaving it in place just generates a few.
I tried to place the gd104.lib in the same directory as the project, and I even re-downloaded GapiDraw1.04 to make sure I had the correct files.
Finally, I checked to make sure I had no other GapiDraw.h, or gd104.lib lying around.
I just can't make it work. On the other hand, every single samples of GapiDraw works flawlessly. I tried to include my own files in one of the sample's project, but still no cigar.
Here are the errors generated:
- Code:
Minimal error LNK2019: unresolved external symbol "__declspec(dllimport) public: long __thiscall CGapiBitmapFont::CreateFontW(unsigned long,struct _GDFONTFX *)" (__imp_?CreateFontW@CGapiBitmapFont@@QAEJKPAU_GDFONTFX@@@Z) referenced in function "public: void __thiscall TFonts::LoadFonts(void)" (?LoadFonts@TFonts@@QAEXXZ)
Minimal error LNK2019: unresolved external symbol "__declspec(dllimport) public: long __thiscall CGapiSurface::CreateSurface(wchar_t const *)" (__imp_?CreateSurface@CGapiSurface@@QAEJPB_W@Z) referenced in function "public: void __thiscall TFonts::LoadFonts(void)" (?LoadFonts@TFonts@@QAEXXZ)
Minimal error LNK2001: unresolved external symbol "__declspec(dllimport) public: long __thiscall CGapiSurface::CreateSurface(wchar_t const *)" (__imp_?CreateSurface@CGapiSurface@@QAEJPB_W@Z)
Minimal error LNK2019: unresolved external symbol "__declspec(dllimport) public: long __thiscall CGapiSurface::SaveSurface(wchar_t const *)" (__imp_?SaveSurface@CGapiSurface@@QAEJPB_W@Z) referenced in function "public: bool __thiscall TGame::SaveScreenShot(wchar_t const *)" (?SaveScreenShot@TGame@@QAE_NPB_W@Z)
Minimal error LNK2019: unresolved external symbol "__declspec(dllimport) public: long __thiscall CGapiSurface::DrawTextW(unsigned long,unsigned long,wchar_t const *,unsigned long,unsigned long,struct _GDTEXTFX *,unsigned long *)" (__imp_?DrawTextW@CGapiSurface@@QAEJKKPB_WKKPAU_GDTEXTFX@@PAK@Z) referenced in function "public: bool __thiscall TRender::DrawTextW(wchar_t const *,long,long,struct TRenderContext,class TSurface *,long,long)" (?DrawTextW@TRender@@QAE_NPB_WJJUTRenderContext@@PAVTSurface@@JJ@Z)
Minimal error LNK2019: unresolved external symbol "__declspec(dllimport) public: long __thiscall CGapiSurface::DrawTextW(unsigned long,unsigned long,wchar_t const *,class CGapiBitmapFont *,unsigned long,struct _GDTEXTFX *,unsigned long *)" (__imp_?DrawTextW@CGapiSurface@@QAEJKKPB_WPAVCGapiBitmapFont@@KPAU_GDTEXTFX@@PAK@Z) referenced in function "public: bool __thiscall TRender::CreateTextBoxOverlay(long,long,char const *)" (?CreateTextBoxOverlay@TRender@@QAE_NJJPBD@Z)
Minimal error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
Minimal fatal error LNK1120: 6 unresolved externals
I don't know where the one on line #7 comes from, I just started to see this one.
Can anyone help? Anyone came across this problem with VC++ .NET?
Thanks...