Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Problem with Getting Started tutorial - Got 2 compiler errors

Author
Message
KawaGeo
15
Years of Service
User Offline
Joined: 7th Aug 2009
Location:
Posted: 8th Aug 2009 07:25
Hi folks!

I am new here.

I just installed VC++ 2008 Express, DirectX 9c (Aug 2007) and DarkGDK sucessfully. For a dry run, I added nothing to the code. It ran and showed a black screen as expected. Now, I added two db commands as per the first tutorial as shown:

dbLoadImage ( “animatedsprite.png”, 1 );
dbSprite ( 1, 0, 0, 1 );

and copied animatedsprite.png file into the folder where main.cpp file resides. I then ran the code in debug mode (F5). I got 2 errors:

1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>Compiling...
1>Main.cpp
1>c:\documents and settings\geo\my documents\visual studio 2008\projects\helloworld\helloworld\main.cpp(17) : error C2065: '“animatedsprite' : undeclared identifier
1>c:\documents and settings\geo\my documents\visual studio 2008\projects\helloworld\helloworld\main.cpp(17) : error C2228: left of '.png”' must have class/struct/union
1> type is ''unknown-type''
1>Build log was saved at "file://c:\Documents and Settings\GEO\My Documents\Visual Studio 2008\Projects\HelloWorld\HelloWorld\Debug\BuildLog.htm"
1>HelloWorld - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Any explanation would be greaty appreciated.

Thank you.

Geo Massar
Retired software engineer
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 8th Aug 2009 12:30
Looks like you are using the wrong kind of quotation marks in you load function..

the correct one to use is : " its usually very close to the enter key on your keyboard and right next to the semicolon.

You would call it like this :

dbLoadImage("animatedsprite.png", 1);

If you are copying pasting code from places, you'll have to manually check through it because sometimes, the symbols like quotes and slashes and commas etc can get mixed up and replaced with things look similar but are totally different characters.

If it ain't broke.... DONT FIX IT !!!
KawaGeo
15
Years of Service
User Offline
Joined: 7th Aug 2009
Location:
Posted: 9th Aug 2009 03:00
Thanks, Mista, for the prompt reply.

You were right. Those quotation marks I copied/pasted from the tutorial were slanted and were in high-order ASCII codes which are not allowed in most computer languages except within a quotation. Due to my poor vision, I didnt notice those in slated form.

I sure hope those writers of the said turorials might see this message and should make those corrections.

Geo Massar

Login to post a reply

Server time is: 2024-10-01 10:21:19
Your offset time is: 2024-10-01 10:21:19