Sign in to follow this  

trying to install MASkinG

This topic is 4401 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

hey, im trying to install this frikkin gui i got this error Project : Win32 Application Compiler : GNU GCC Compiler (called directly) Directory : C:\Documents and Settings\Lavontae\Desktop-------------------------------------------------------------------------------- Switching to target: default Linking executable: C:\Documents and Settings\Lavontae\Desktop\Win32GUI.exe C:\Program Files\CodeBlocks\lib/libmingw32.a(main.o):main.c:(.text+0x106): undefined reference to `WinMain@16' collect2: ld returned 1 exit status Process terminated with status 1 (0 minutes, 1 seconds) and here is the code
// example 1: A simple "Hello, world!" example for MASkinG. We put a button
// on a dialog and execute it.

#include "MASkinG.h"
using namespace MAS;


class MyDialog : public Dialog {
	private:
		// here you put your dialog controls like boxes, buttons, etc.:
		ClearScreen desktop;
		Button myFirstButton;
		Button mySecondButton;

	public:
		MyDialog();
};

// All the initialization can be done in the constructor
MyDialog::MyDialog() : Dialog() {
	// Set the control's size, position, flags, etc.
	myFirstButton.SetText("Hello, world!");
	myFirstButton.Shape(120, 180, 120, 24);
	myFirstButton.MakeExit();

	// Add the controls to the dialog
	Add(desktop);
	Add(myFirstButton);
}


int main() {
	// install everything
	Error err = InstallMASkinG("allegro.cfg");
	if (err) {
		err.Report();
	}

	// make a dialog and execute it
	MyDialog *dlg = new MyDialog;
	dlg->Execute();
	delete dlg;

	// clean up
	ExitMASkinG();
	return 0;
}
END_OF_MAIN();

Share this post


Link to post
Share on other sites
Are you using C or c++? Im pretty c, especially when used in a gui, would be very strict on what you define main as. I think in c it should be: int main(int argc, char*args[]) or something to that effect.

Share this post


Link to post
Share on other sites
Sign in to follow this