PocketMatrix forums

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

Troubles Compiling in 204

Hi,

I'm having troubles compiling. I am using eVC 3.0, GAPIDraw 204. Here's the errors:

Code:
Compiling...
SoundTest.cpp
D:\DJ Programming\Deege.com games\Sound Test\Code\Common\SoundTest.cpp(26) : error C2065: 'GDDRAWTEXT_BORDER' : undeclared identifier
D:\DJ Programming\Deege.com games\Sound Test\Code\Common\SoundTest.cpp(26) : error C2660: 'DrawTextW' : function does not take 5 parameters
Error executing clarm.exe.
Creating browse info file...


As far as I can tell, GDDRAWTEXT_BORDER isn't there anymore. It wasn't listed with the other GDDRAWTEXT_* definitions in GAPIDraw.h. Not sure what is causing the second error. The cpp file I am compiling is simply the sample C++ code from the doc. I haven't added anything yet.

Thanks!
Deege
looks like you updated a project from a previous version of GapiDraw?

the text handling is done differently in 204, and some of the calls are different

have a look at the docs and you'll see what I mean
Actually I am using the example from the documentation that came from GAPI 2.04. I noticed later that it also was including the incorrect dll, so the documentation is out of date.

Seems to me the old method should still work, since the differences are within minor versions. It worked in 2.01, and fails in 2.04. The interface should not be changing within minor versions.

Commenting out the line does allow me to compile, and I'll watch for similar stuff in the future.

Thanks
Deege
I know when I converted a 201b project to 202 I had to change my text code because of changes to the library

I ended up looking at the sample code for the simple project and how it was doing it's thing - I haven't actually looked at the docs, but I know there was discussion about the new way the text is done just before the release - you might want to find that thread to see if it helps at all ?
I think degee's point though was that a minor version number change in general should never alter an interface. I would agree with that statement.

You should of course try to never make a change that breaks existing code at all, but certainly it should be avoided within the same major version tree.

It seems wrong to criticize Johan about anything, but I think this is a valid point none the less.

I also suspect the changes will entail very minor alterations to degee's code, so the degree to which this is a problem is likely very small in any case.
I'll see if I can get around updating the project tutorial when I get back from Siggraph...
:) I've updated the tutorial using "vi" .. I hope it works.. If anyone have time - could you please try and simply paste this code into the minimal sample and see if it works (just remove everything in minimal.h and paste the code into minimal.cpp)..

deege: I will use your suggested version handling in future releases. Right now I have had quite a lot of changes with each version and didn't want to end up near 3.0 (which I have reserved for some cool stuff)...