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++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl and mingw compiler error
GridCtrl and mingw compiler error [message #8752] Wed, 28 March 2007 23:32 Go to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

attached there is a test case (just a simply layout) that run OK in MSC8 and produces the following complains from mingw
main.cpp
In file included from C:/upp/uppsrc/CtrlCore/lay.h:22,
                 from C:\MyApps\testgridbug\/testgridbug.h:10,
                 from C:\MyApps\testgridbug\main.cpp:1:
C:/MyApps/testgridbug/testgridbug.lay:5: error: expected unqualified-id before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:6: error: expected unqualified-id before numeric constant
In file included from C:/upp/uppsrc/CtrlCore/lay.h:35,
                 from C:\MyApps\testgridbug\/testgridbug.h:10,
                 from C:\MyApps\testgridbug\main.cpp:1:
C:/MyApps/testgridbug/testgridbug.lay: In function `void InitLayout(Upp::Ctrl&, L&, D&, testgridbugLayout__lay
	id&)':
C:/MyApps/testgridbug/testgridbug.lay:5: error: expected unqualified-id before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:5: error: expected `;' before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:5: error: expected unqualified-id before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:6: error: expected unqualified-id before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:6: error: expected `;' before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:6: error: expected unqualified-id before numeric constant
C:/upp/uppsrc/GridCtrl/GridCtrl.h: At global scope:
C:/upp/uppsrc/GridCtrl/GridCtrl.h:857: warning: inline function `Upp::Item& Upp::GridCtrl::GetItem(int, int)' 
	used but never defined
testgridbug: 1 file(s) built in (0:08.46), 8469 msecs / file, duration = 8469 msecs

There were errors. (0:08.78)


The problem is that because of it the same problem appear when I try to compile the program under linux. The previous errors come from 2007.1.rc2 but they are the same with 2007.1.rc3 under ubuntu 6.10.
Any idea to overcome the problem?

Luigi
Re: GridCtrl and mingw compiler error [message #8754 is a reply to message #8752] Thu, 29 March 2007 08:35 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Look at your upp file. What is missing ? Wink
uses
    CtrlLib;
        <<---------- there is no GridCtrl package listed here
file
    testgridbug.h,
    main.cpp,
    testgridbug.lay;

mainconfig
    "" = "GUI";

Re: GridCtrl and mingw compiler error [message #8756 is a reply to message #8754] Thu, 29 March 2007 09:09 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
unodgs wrote on Thu, 29 March 2007 08:35

Look at your upp file. What is missing ? Wink
uses
    CtrlLib;
        <<---------- there is no GridCtrl package listed here
file
    testgridbug.h,
    main.cpp,
    testgridbug.lay;

mainconfig
    "" = "GUI";




Opsss... I believed it were there because I've added it with Add Package.
Now I've added it. Then I've installed under windows the 2007.1.rc3. GridCtrl seems to be present in the package list... CTRL+F5...

main.cpp
In file included from C:/upp/uppsrc/CtrlCore/lay.h:22,
                 from C:\MyApps\testgridbug\/testgridbug.h:10,
                 from C:\MyApps\testgridbug\main.cpp:1:
C:/MyApps/testgridbug/testgridbug.lay:5: error: expected unqualified-id before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:6: error: expected unqualified-id before numeric constant
In file included from C:/upp/uppsrc/CtrlCore/lay.h:35,
                 from C:\MyApps\testgridbug\/testgridbug.h:10,
                 from C:\MyApps\testgridbug\main.cpp:1:
C:/MyApps/testgridbug/testgridbug.lay: In function `void InitLayout(Upp::Ctrl&, L&, D&, testgridbugLayout__la
	yid&)':
C:/MyApps/testgridbug/testgridbug.lay:5: error: expected unqualified-id before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:5: error: expected `;' before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:5: error: expected unqualified-id before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:6: error: expected unqualified-id before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:6: error: expected `;' before numeric constant
C:/MyApps/testgridbug/testgridbug.lay:6: error: expected unqualified-id before numeric constant
C:/upp/uppsrc/GridCtrl/GridCtrl.h: At global scope:
C:/upp/uppsrc/GridCtrl/GridCtrl.h:870: warning: inline function `Upp::Item& Upp::GridCtrl::GetItem(int, int)'
	 used but never defined
testgridbug: 1 file(s) built in (0:07.96), 7968 msecs / file, duration = 7984 msecs

There were errors. (0:08.25)


In attached there is the package. In MSC8 it works. Perhaps is the too long string in lay file regarding the gridctrl or the order in which the methods are listed that cause problem to Mingw Rolling Eyes

Luigi
Re: GridCtrl and mingw compiler error [message #8793 is a reply to message #8756] Sun, 01 April 2007 10:54 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

This bug is not GridCtrl related. The problem is mingw Smile Mirek helped me to find it. There is #define edt2 0x481
in mingw\include\dlgs.h(55) file. One of your var name was the same - that's why you got so strange error message. In rc4 all these defines were commented.
Re: GridCtrl and mingw compiler error [message #8804 is a reply to message #8793] Sun, 01 April 2007 22:52 Go to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
unodgs wrote on Sun, 01 April 2007 10:54

This bug is not GridCtrl related. The problem is mingw Smile Mirek helped me to find it. There is #define edt2 0x481
in mingw\include\dlgs.h(55) file. One of your var name was the same - that's why you got so strange error message. In rc4 all these defines were commented.


It was a terrible bug. Perhaps it is even responsible of the crush of my app under linux. I'll check it in the next days.
For the moment it works with rc4 & Windows.
Thanks a lot!

Luigi
Previous Topic: Wrong display in arrayctrl
Next Topic: GridCtrl and AttrText
Goto Forum:
  


Current Time: Sun Apr 28 13:30:55 CEST 2024

Total time taken to generate the page: 0.02927 seconds