Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » Print.cpp compile error
Print.cpp compile error [message #19502] Tue, 09 December 2008 11:15 Go to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
I get:

Print.cpp
c:\programs\upp-svn\uppsrc\ide\Print.cpp:69: error: expected `)' before '&' token
c:\programs\upp-svn\uppsrc\ide\Print.cpp:124: error: expected `}' at end of input
c:\programs\upp-svn\uppsrc\ide\Print.cpp:67: error: expected unqualified-id at end of input


when trying to compile latest SVN version (rev. 697).

Latest running version I have is 811.r172.

WinXP, Mingw 4.3.0

Matthias
Re: Print.cpp compile error [message #19587 is a reply to message #19502] Sun, 21 December 2008 06:29 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 288
Registered: November 2008
Experienced Member
Hello, Matthias.

Confirmed.
PrintDlg defined in "commdlg.h" header file that included in "uppsrc\ide\PrinterJob.cpp". Unified diff for fixed "uppsrc\ide\Print.cpp" file below (or full file in attachment):
@@ -1,26 +1,25 @@
 #include "ide.h"
 
-class PrintDlg : public WithPrintLayout<TopWindow> {
-	typedef PrintDlg CLASSNAME;
-
+class PrintDialog : public WithPrintLayout<TopWindow> {
 public:
-	PrintDlg();
+	typedef PrintDialog CLASSNAME;
+	PrintDialog();
 };
 
-PrintDlg::PrintDlg()
+PrintDialog::PrintDialog()
 {
 	CtrlLayoutOKCancel(*this, "Print");
 	columns <<= 1;
 	orientation <<= 0;
 	line <<= 100;
 }
 
 INITBLOCK {
-	RegisterGlobalConfig("PrintDlg");
-};
+	RegisterGlobalConfig("PrintDialog");
+}
 
 struct Printer {
 	Draw& w;
 	Size  page;
 	int   cols;
 	int   line;
@@ -63,15 +62,13 @@
 				x++;
 			}
 		}
 		NextLine();
 	}
 	
-	Printer(PrintDlg& dlg, Draw& w, int tabs) : w(w), tabs(tabs) {
-		cols = ~dlg.columns;
-		line = ~dlg.line;
+	Printer(Draw& w, int cols, int line, int tabs) : w(w), cols(cols), line(line), tabs(tabs) {
 		page = w.GetPagePixels();
 		columncx = page.cx / cols;
 		cx = page.cx / cols - 100;
 		int l = 0;
 		int h = 1000;
 		while(l < h) {
@@ -86,25 +83,26 @@
 		fcx = fi.GetWidth('x');
 		fcy = fi.GetHeight();
 		lines = page.cy / fcy;
 		y = coli = 0;
 		w.StartPage();
 	}
+
 	~Printer() {
 		w.EndPage();
 	}
 };
 
 void Ide::Print()
 {
 	if(designer)
 		return;
-	PrintDlg dlg;
-	LoadFromGlobal(dlg, "PrintDlg");
+	PrintDialog dlg;
+	LoadFromGlobal(dlg, "PrintDialog");
 	int c = dlg.Execute();
-	StoreToGlobal(dlg, "PrintDlg");
+	StoreToGlobal(dlg, "PrintDialog");
 	if(c != IDOK)
 		return;
 	PrinterJob job;
 	job.Landscape(dlg.orientation);
 	if(!job.Execute())
 		return;
@@ -115,10 +113,10 @@
 		h = editor.GetLine(h);
 	}
 	else {
 		l = 0;
 		h = editor.GetLineCount() - 1;
 	}
-	Printer p(dlg, job, editor.GetTabSize());
+	Printer p(job, ~dlg.columns, ~dlg.line, editor.GetTabSize());
 	for(int i = l; i <= h; i++)
 		p.PrintLine(editor.GetWLine(i));
 }



Another solution:
#ifdef PrintDlg
	#undef PrintDlg
#endif
  • Attachment: Print.zip
    (Size: 1.05KB, Downloaded 194 times)

[Updated on: Sun, 21 December 2008 22:14]

Report message to a moderator

Re: Print.cpp compile error [message #19859 is a reply to message #19502] Tue, 27 January 2009 14:27 Go to previous message
emr84 is currently offline  emr84
Messages: 26
Registered: April 2008
Location: Argentina
Promising Member
The bug remain in svn (svn 813). Somebody can fix it?
Previous Topic: how to rebuild TheIDE on Win32?
Next Topic: crash on windows
Goto Forum:
  


Current Time: Fri Dec 06 17:24:05 CET 2019

Total time taken to generate the page: 0.02213 seconds