porting win to lin by newbie

M

Michael Sgier

Hello
following questions. The program runs on windows but on linux i get
the following error at the end but first:
the Bitmap_id serves what for? 0x4d42 is that an address?
the HDC serves what for? Do i need that on linux? and
then the 256 at keypressed? What for?
////// Defines
#define BITMAP_ID 0x4D42 // the universal bitmap ID

////// Global Variables
HDC g_HDC; // global device context
bool keyPressed[256]; // holds true for keys that are pressed

// LoadBitmapFile
// desc: Returns a pointer to the bitmap image of the bitmap specified
// by filename. Also returns the bitmap header information.
// No support for 8-bit bitmaps.
unsigned char *LoadBitmapFile(char *filename, BITMAPINFOHEADER
*bitmapInfoHeader)
{

....ektzwei/src/projektzwei.cpp:31: error: type specifier omitted for
parameter `BITMAPINFOHEADER'
What is meant with BITMAPINFOHEADER? Can i define my own typ? the above
is running with
windows but not with linux. If i want to create a new typ
BITMAPINFOHEADER , how should i do
that??
many thanks and regards
Michael
 
A

Alan Johnson

Michael said:
Hello
following questions. The program runs on windows but on linux i get
the following error at the end but first:
the Bitmap_id serves what for? 0x4d42 is that an address?
the HDC serves what for? Do i need that on linux? and
then the 256 at keypressed? What for?
////// Defines
#define BITMAP_ID 0x4D42 // the universal bitmap ID

////// Global Variables
HDC g_HDC; // global device context
bool keyPressed[256]; // holds true for keys that are pressed

// LoadBitmapFile
// desc: Returns a pointer to the bitmap image of the bitmap specified
// by filename. Also returns the bitmap header information.
// No support for 8-bit bitmaps.
unsigned char *LoadBitmapFile(char *filename, BITMAPINFOHEADER
*bitmapInfoHeader)
{

...ektzwei/src/projektzwei.cpp:31: error: type specifier omitted for
parameter `BITMAPINFOHEADER'
What is meant with BITMAPINFOHEADER? Can i define my own typ? the above
is running with
windows but not with linux. If i want to create a new typ
BITMAPINFOHEADER , how should i do
that??
many thanks and regards
Michael

HDC and BITMAPINFOHEADER are both types defined by the win32 API, and
have no direct equivalent in Linux. In general, porting a GUI from one
platform specific UI to another involves essentially a complete rewrite.
Probably the easiest way to port an application written for win32 is
to use something like winelib.

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top