Jump to content
  • Advertisement


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

Nick Murphy

Power Render 2.6 (and 3) and C++

This topic is 7041 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 tried to use C++ (Visual C++ 6) with Power Render. I
used an example and changed the names from .c
to .cpp !! Visual C recognizes that and compiles in
C++. At the beginning I got a lot of errors (for
example winutil.cpp, Direct X, you have to remove
these ->lpVtbl-> stuff). Also, everywhere you find
something like extern HWND hWndMain you will have
to replace that to extern "C" HWND hWndMain, and so
on, if not, you get Linker errors.
Now, after all these problems were found and
removed, I have a last problem, and I think it's a "bug"
in Power Render. When compiling I get the following

pr.lib(Prhrdwre.obj) : error LNK2001:
Nichtaufgeloestes externes Symbol _hWndMain
pr.lib(Prerror.obj) : error LNK2001: Nichtaufgeloestes
externes Symbol _hWndMain
pr.lib(Prglobal.obj) : error LNK2001:
Nichtaufgeloestes externes Symbol _hWndMain
..\game\gokart.exe : fatal error LNK1120: 1
unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.

Sorry, it is german, but you can see it at the
ErrorCode. It means, that the linker could not find
hWndMain. The same errors came up before I put a
extern "C" instead of extern in front of external
variables and functions. Because these errors are
embedded into pr.lib, I cannot do anything against it.

Any ideas ????



Share this post

Link to post
Share on other sites
Yes, i have the same problem before.

This is how i bypass it.

I actually keep winutil.c as it is, but all my programs
are in .cpp

To get the value of hWndMain, i wrote a function in
winutil.c to return the value.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!