Click here to Skip to main content
15,907,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: error LNK2001: unresolved external symbol Pin
Waldermort17-Mar-06 22:12
Waldermort17-Mar-06 22:12 
QuestionHow to check what is the current ODBC driver version Pin
nhuythanh17-Mar-06 18:31
nhuythanh17-Mar-06 18:31 
AnswerRe: How to check what is the current ODBC driver version Pin
Paul Conrad17-Mar-06 19:06
professionalPaul Conrad17-Mar-06 19:06 
QuestionFrame Rate Pin
J512198217-Mar-06 17:57
J512198217-Mar-06 17:57 
Questiontables within richedit controls Pin
Waldermort17-Mar-06 15:26
Waldermort17-Mar-06 15:26 
QuestionQuestions about defines, includes, etc... Pin
Lord Kixdemp17-Mar-06 15:10
Lord Kixdemp17-Mar-06 15:10 
AnswerRe: Questions about defines, includes, etc... Pin
Stephen Hewitt17-Mar-06 15:16
Stephen Hewitt17-Mar-06 15:16 
GeneralRe: Questions about defines, includes, etc... Pin
Lord Kixdemp17-Mar-06 16:46
Lord Kixdemp17-Mar-06 16:46 
Well... Yeah, I forgot to define those... Blush | :O But it still doesn't work after it's defined:

========================
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

// Size of screen
#define WIDTH 640
#define HEIGHT 480

// Character/Tile size
#define CSIZE 16

// Window title
#define WINTITLE "Test SDL game..."

// Path to images directory
#define IMGDIR "./images/"
// Main character's image file
#define CHRIMG "robot0.png"

#include <iostream> // Standard lib
using namespace std; // Standard lib
#include "SDL.h" // SDL
#include "SDL_image.h" // SDL_image (for loading non-BMP graphics)

#include "GameClass.cpp" // This class handles the game's internal engine
#include "DisplayHandling.cpp" // And this one handles displaying to screen

========================

I get all of these errors:

========================
compiling sdltest.cpp (g++)
compiling DisplayHandling.cpp (g++)
/home/kixdemp/devel/sdltest/src/DisplayHandling.cpp: In member function ‘int DispHnd::Init(char*, GameClass*)’:
/home/kixdemp/devel/sdltest/src/DisplayHandling.cpp:33: error: ‘IMGDIR’ was not declared in this scope
/home/kixdemp/devel/sdltest/src/DisplayHandling.cpp:33: error: ‘CHRIMG’ was not declared in this scope
/home/kixdemp/devel/sdltest/src/DisplayHandling.cpp:65: error: ‘WIDTH’ was not declared in this scope
/home/kixdemp/devel/sdltest/src/DisplayHandling.cpp:65: error: ‘HEIGHT’ was not declared in this scope
/home/kixdemp/devel/sdltest/src/DisplayHandling.cpp:75: error: ‘WINTITLE’ was not declared in this scope
/home/kixdemp/devel/sdltest/src/DisplayHandling.cpp: In member function ‘void DispHnd::Render()’:
/home/kixdemp/devel/sdltest/src/DisplayHandling.cpp:99: error: ‘CSIZE’ was not declared in this scope
/home/kixdemp/devel/sdltest/src/DisplayHandling.cpp:114: error: ‘WIDTH’ was not declared in this scope
/home/kixdemp/devel/sdltest/src/DisplayHandling.cpp:114: error: ‘HEIGHT’ was not declared in this scope

========================

But it WAS declared! Why that error? Confused | :confused: Thanks! Wink | ;-)

BTW: I'm using KDevelop in Linux.

Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
GeneralRe: Questions about defines, includes, etc... Pin
Waldermort17-Mar-06 18:16
Waldermort17-Mar-06 18:16 
GeneralRe: Questions about defines, includes, etc... Pin
Lord Kixdemp18-Mar-06 12:01
Lord Kixdemp18-Mar-06 12:01 
QuestionDerived class causes error Pin
BuckBrown17-Mar-06 13:03
BuckBrown17-Mar-06 13:03 
AnswerRe: Derived class causes error Pin
PJ Arends17-Mar-06 13:24
professionalPJ Arends17-Mar-06 13:24 
AnswerRe: Derived class causes error Pin
Stephen Hewitt17-Mar-06 15:03
Stephen Hewitt17-Mar-06 15:03 
GeneralRe: Derived class causes error Pin
BuckBrown21-Mar-06 3:15
BuckBrown21-Mar-06 3:15 
QuestionVC++ Express Edition 2005 Pin
thierrypp17-Mar-06 10:48
thierrypp17-Mar-06 10:48 
AnswerRe: VC++ Express Edition 2005 Pin
George L. Jackson17-Mar-06 12:03
George L. Jackson17-Mar-06 12:03 
GeneralRe: VC++ Express Edition 2005 Pin
thierrypp17-Mar-06 22:18
thierrypp17-Mar-06 22:18 
Questionrichedit controls Pin
Waldermort17-Mar-06 7:47
Waldermort17-Mar-06 7:47 
AnswerRe: richedit controls Pin
Waldermort17-Mar-06 8:26
Waldermort17-Mar-06 8:26 
QuestionTrackbar Control Pin
amanoullah17-Mar-06 7:44
amanoullah17-Mar-06 7:44 
AnswerRe: Trackbar Control Pin
Waldermort17-Mar-06 7:53
Waldermort17-Mar-06 7:53 
GeneralRe: Trackbar Control Pin
Ravi Bhavnani17-Mar-06 11:33
professionalRavi Bhavnani17-Mar-06 11:33 
QuestionWhere are IE favourites in registry Pin
Chintoo72317-Mar-06 6:10
Chintoo72317-Mar-06 6:10 
AnswerRe: Where are IE favourites in registry Pin
Michael Dunn17-Mar-06 6:53
sitebuilderMichael Dunn17-Mar-06 6:53 
QuestionHow do i create my own bitmap? Pin
woosoo17-Mar-06 5:23
woosoo17-Mar-06 5:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.