Horde3D

Next-Generation Graphics Engine
It is currently 28.03.2024, 11:07

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Static linking
PostPosted: 12.06.2013, 20:14 
Offline

Joined: 27.03.2011, 08:40
Posts: 47
Location: Fi
Im trying to link (newest from svn)horde3d static lib, using Visual Studio express 2012, but cant get it to work.

First I changed Horde3D Engine and Horde3D Utils -projects' "Configuration type" from "Dynamic Library (.dll)" to "Static library (.lib)".

Then I added
#define DLL to beginning of the Horde3D.h
and
#define DLLEXP to beginning of the uPlatform.h .

Finally commented out DllMain() functions at the end of the egMain.cpp and main.cpp .

But get
Quote:
Error 3 error LNK2001: unresolved external symbol "void __cdecl h3dShowOverlays(float const *,int,float,float,float,float,int,int)" (?h3dShowOverlays@@YAXPBMHMMMMHH@Z)

etc LNK 2001 unresolved errors.

What Im missing?


Last edited by mikel on 28.01.2014, 08:41, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Static linking
PostPosted: 17.06.2013, 07:26 
Offline

Joined: 17.06.2013, 07:19
Posts: 2
DLLEXP void h3dShowOverlays( const float *verts, int vertCount, float colR, float colG,
float colB, float colA, uint32 materialRes, int flags )

should change to

DLLEXP void h3dShowOverlays( const float *verts, int vertCount, float colR, float colG,
float colB, float colA, int materialRes, int flags );


because in horde3d.h header file the function is declared like this:

DLL void h3dShowOverlays( const float *verts, int vertCount, float colR, float colG, float colB,
float colA, H3DRes materialRes, int flags );

here H3DRes is int, not uint32


Top
 Profile  
Reply with quote  
 Post subject: Re: Static linking
PostPosted: 17.06.2013, 08:05 
Offline

Joined: 26.08.2008, 18:48
Posts: 120
299299 wrote:
DLLEXP void h3dShowOverlays( const float *verts, int vertCount, float colR, float colG,
float colB, float colA, uint32 materialRes, int flags )

should change to

DLLEXP void h3dShowOverlays( const float *verts, int vertCount, float colR, float colG,
float colB, float colA, int materialRes, int flags );


or change it to this

DLLEXP void h3dShowOverlays( const float *verts, int vertCount, float colR, float colG,
float colB, float colA, ResHandle materialRes, int flags );

as other functions use ResHandle when Horde3D.h uses H3DRes.


Top
 Profile  
Reply with quote  
 Post subject: Re: Static linking
PostPosted: 17.06.2013, 15:51 
Offline

Joined: 27.03.2011, 08:40
Posts: 47
Location: Fi
Ah, got it. Replaced couple of other params to int too, and got working Sample_Chicago.exe which works without dll.

Functions which didnt compile (but works with int):

void h3dShowOverlays( const float *verts, int vertCount, float colR, float colG,
float colB, float colA, int materialRes, int flags );

bool h3dSetOption( int param, float value );

float h3dGetStat( int param, bool reset );


Thanks.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 34 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group