Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Amadrias

PR in a dll

This topic is 6186 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

Hi, I need good windows programmers here ! My actual project is defined as follows : 1/ a win32 project, 2/ a dll project that wraps PowerRender calls so I just care of gamelogic in my win32 project. (see this has a dll for the High Level Engine). Everything works as I wanted but one thing : linking! (once more ;-)). Ok, here I need your help : I need to ''import'' (not sure that it is the good term to call it) some things from my win32 project which are : PR_ChooseDDraw_Driver(...) msetxy() mouse (the PR_MouseCallback_Data) kbdon Does anyone up here knows how I can do it so I stop getting that linking errors ?... Thanks a lot, Amadrias France

Share this post


Link to post
Share on other sites
Advertisement
What is the link error message?

You should be able to add the DLL as an external dependancy, and clear it up.

Share this post


Link to post
Share on other sites
Here is the output liking messages

Linking...
Creating library ../../bin/debug/xPRience.dev.lib and object ../../bin/debug/xPRience.dev.exp
pr.lib(PRGLOBAL.OBJ) : error LNK2001: unresolved external symbol _PR_ChooseDDraw_Driver
pr.lib(PRINPUT.OBJ) : error LNK2001: unresolved external symbol _msetxy
pr.lib(PRINPUT.OBJ) : error LNK2001: unresolved external symbol _mouse
pr.lib(PRINPUT.OBJ) : error LNK2001: unresolved external symbol _kbdon

Share this post


Link to post
Share on other sites
A simple fix should be:

On file view, for the game project, you should see "game" files. Where game is the win32 game.
Right click and select add files to project.

Set the mask to DLL or all. Then find your DLL and everything should be OK.

Note, there are many ways to do this. This one is easy.

Share this post


Link to post
Share on other sites
After posting, I looked a little closer at the specific lines.

You haven''t included, some needed functions from winutil.c in your DLL.

Share this post


Link to post
Share on other sites
I now have solve all linking problems...

Now come another problem to solve !

PowerRender is used within an application as static libraries which allows the application that will use it to get memory access to all PowerRender functions and variables.

Now, when you encapsulate PowerRender as I am doing within a dll, it means that you can access PowerRender within this dll. My problem is that it seem that I can not set up DirectX correctly through PowerRender...

When I try to set a viewport active, I got an unhandled exception.

Anyone could help here ?...

Amadrias

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!