PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Problem with Linking..

since i started understanding how to code for symbian, i'v been pulling more and more hairs ;)
fair enough i say its the 'ugliest' OS to code for.
doing some 2d is what i want to do, check the gapidraw lib and looks very nice indeed, i can compile the win32 with no problem.
now i want to do some symbian (for my n-gage).
i'v put the neccery xp lib of gapi in the epoc32\release\wins\udeb

my main function is
Code:

void OSLMain::ConstructL( const TDesC& aCommandLine )
{
//* Setup Sever
User::LeaveIfError(m_WsSession.Connect());

// * Create WsScreen
m_WsScreen = new (ELeave) CWsScreenDevice( m_WsSession );

User::LeaveIfError( m_WsScreen->Construct( ) );
User::LeaveIfError( m_WsScreen->CreateContext( m_WindowGc ) );

// * Setuup Group
m_WsWindowGroup = RWindowGroup( m_WsSession );

User::LeaveIfError( m_WsWindowGroup.Construct( (TUint32)this ) );
m_WsWindowGroup.SetOrdinalPosition(0);

// * Setup ???
m_WsWindow = RWindow( m_WsSession );

User::LeaveIfError( m_WsWindow.Construct( m_WsWindowGroup, (TUint32)this ) );


// * Activate Display
m_WsWindow.Activate( );
m_WsWindow.SetExtent( TPoint( 0,0 ), TSize( 176,208 ) );
m_WsWindow.SetVisible( EFalse );

// *Gapi Draw* //
m_GapiDraw = new CGapiDraw(); // - Create Gapi
m_GapiDisp = new CGapiDisplay(); // - Create Drawing Class

m_GapiDisp->OpenDisplay(m_WsSession,GDDISPLAY_FULLSCREEN|GDDISPMODE_NORMAL|GDDISPLAY_SYMBIANPALETTE32);
m_GapiSurf = m_GapiDisp->GetBackBuffer();
m_GapiSurf->FillRect( NULL, RGB( 0, 0, 0 ), 0, NULL );
m_GapiDisp->Flip();

//* Start Server Event
//StartWServEvents( );
}


of course i have a main class.
but the point is that i can't link to the exe because i get:
error LNK2001: unresolved external symbol "public: long __thiscall CGapiDisplay::OpenDisplay(class RWsSession &,unsigned long)" (?OpenDisplay@CGapiDisplay@@QAEJAAVRWsSession@@K@Z)

at this code: m_GapiDisp->OpenDisplay(m_WsSession,GDDISPLAY_FULLSCREEN|GDDISPMODE_NORMAL|GDDISPLAY_SYMBIANPALETTE32);

if i remove this line, the code is compilable and linkable..
what is my prob??
note: i am talking about the wins build (urel/udeb)
it does compile under the thumb release.

my mmp looks like this:
Code:


TARGET chip.exe
TARGETTYPE exe
UID 0

SOURCEPATH .
SOURCE chip.cpp

USERINCLUDE .
USERINCLUDE ..\CommonFramework
USERINCLUDE \GapiDraw300Eval\include\symbian
SYSTEMINCLUDE \Epoc32\include

LIBRARY euser.lib
LIBRARY gd300.lib
LIBRARY efsrv.lib
LIBRARY ws32.lib
Why do you build an EXE file and not an app? You cannot use the image loaders in the exe file, and you will have loads of other issues, such as this one... :|

Please reconsider if you can build an APP file instead of an exe...
i don't need app, as this is for gui mostly.
though i will use app file to load the exe from the mmc.
the exe will use the gapidraw lib and will create an window where i can draw on [primary surface / back buffer).
i am doing it to port my emu to my n-gage.
the code compiles though on the thumb release.
As stated in the readme file there's currently no emulator support, so you need to build for thumb or armi.

/Jonas
yeah, thats what i did, and it works on my n-gage.