Re: build error on FXApp.cpp

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: build error on FXApp.cpp

by Niall Douglas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 25 Feb 2006 at 15:24, jayn@... wrote:

> >> 3. The error line below had to be commented out.
> >> src/FXApp.cpp: In function 'int FX::xerrorhandler(Display*,
> >> XErrorEvent*)':
> >> src/FXApp.cpp:1147: error: 'FXThread' has not been declared
> >> src/FXApp.cpp:1147: error: 'current' was not declared in this scope
> >
> > I don't get this error on mine. It compiles fine.
> >
>
> ok, I'll look into this more.  I do notice that FXThread isn't in your
> class documentation, which uses QThread instead, but I haven't followed up
> on it.

It was obvious really - I have the FOX compat layer enabled. Fixed in
SVN.

> A couple of problems ...
>
> 1. had to specify FX::strdup(tmp) to keep the compiler from aborting with
> a conflict error from one included by string.h in gltest.cpp

Should be fixed in SVN. Haven't tested it though.

> 2.ControlPanel.cpp doesn't build because of a duplication of
> DEFAULT_SPACING definition below, plus some problem with QSSLDevice.h that
> I haven't looked into.
>
> ControlPanel.cpp:23:1: warning: "DEFAULT_SPACING" redefined
> In file included from /home/jay/tnfox/TnFOX/include/fx.h:132,
>                  from ControlPanel.cpp:20:
> /home/jay/tnfox/TnFOX/include/FXPacker.h:35:1: warning: this is the
> location of the previous definition
> /home/jay/tnfox/TnFOX/include/QSSLDevice.h:90: error: expected identifier
> before numeric constant

If ControlPanel.cpp defines its own DEFAULT_SPACING, it will need
changing. I fixed the QSSLDevice.h problem by renaming None to
NoEncryption. It's in SVN.

> 3. groupbox.cpp doesn't compile because of conflicting definitions of
> timeval shown below.
>
> /usr/include/bits/resource.h:161: error: use of 'timeval' is ambiguous
> /usr/include/bits/time.h:70: error:   first declared as 'struct timeval' here
> /home/jay/tnfox/TnFOX/include/FXProcess.h:46: error:   also declared as
> 'typedef struct FX::timeval FX::timeval' here
> /usr/include/bits/resource.h:161: error: use of 'timeval' is ambiguous
> /usr/include/bits/time.h:70: error:   first declared as 'struct timeval' here
> /home/jay/tnfox/TnFOX/include/FXProcess.h:46: error:   also declared as
> 'typedef struct FX::timeval FX::timeval' here
> /usr/include/bits/resource.h:161: error: conflicting declaration 'struct
> timeval'
> /usr/include/bits/time.h:70: error: 'struct timeval' has a previous
> declaration as 'struct timeval'
> /usr/include/bits/resource.h:161: confused by earlier errors, bailing out
> scons: *** [groupbox.o] Error 1
> scons: building terminated because of errors.

Hopefully fixed in SVN but not tested.

> 4. iconlist.cpp builds, but on running produces a bunch of assert messages.
>
> TYPE:SEL_UPDATE              ID:1     SENDER: FXIconList      PTR:
> 0x00000000 #1   src/FXDebugTarget.cpp:155:
> FXASSERT(ARRAYNUMBER(messageTypeName)==SEL_LAST) failed.
> 2   Deleted secure heap
>
> Unhandled Signal 0x2 (User interrupt)
>     at address (nil) - immediate exit!

Dunno about this one.

> 5. imageviewer.cpp builds, but on running and selecting a gif file, it
> aborts with an error below (the first two exceptions are at startup).
>
> [jay@localhost tests]$ ./imageviewer
> FXApp: Using font 'luxi sans,80,normal,normal' for normal font
> FXException id 1 created, 'File '/home/jay/.foxrc/FoxTest/FoxTest' not
> found' at line 275 in src/QFile.cxx thread -1425916512
> FXException id 2 created, 'File '/home/jay/.foxrc/FoxTest/ImageViewer' not
> found' at line 275 in src/QFile.cxx thread -1425916512
> Deleted secure heap
>
> Unhandled Signal 0xb (Segmentation fault [Address not mapped to object])
>     at address (nil) - immediate exit!

Oh dear. I will investigate when I next get time.

> 6.memmap.cpp fails to build.  I haven't looked into this.
>
> memmap.o(.text+0xcc): In function `main':
> /home/jay/tnfox/TnFOX/fox_tests/tests/memmap.cpp:52: undefined reference
> to `FX::FXMemMap::FXMemMap()'

It should work if you enable the FOX compat layer in config.py.

Cheers,
Niall





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Tnfox-discussion mailing list
Tnfox-discussion@...
https://lists.sourceforge.net/lists/listinfo/tnfox-discussion

Parent Message unknown Re: build error on FXApp.cpp

by Niall Douglas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 26 Feb 2006 at 11:39, jayn@... wrote:

> >> 1. had to specify FX::strdup(tmp) to keep the compiler from aborting
> >> with
> >> a conflict error from one included by string.h in gltest.cpp
> >
> > Should be fixed in SVN. Haven't tested it though.
>
> This one not fixed.  Several strdup definitions in the includes, but I
> haven't looked into this further.

I've added the fox test suite. I fixed these strdup problems by
adding WIN32_LEAN_AND_MEAN to fx3d.h so it doesn't include WinSock.h

>   /home/jay/tnfox/TnFOX/include/fx.h:294: error: 'timeval' is already
> declared in this scope
>   /home/jay/tnfox/TnFOX/include/fx.h:299: error: 'strdup' is already
> declared in this scope
>   ../Tn/TFileBySyncDev.cxx: In member function 'void
> Tn::TFileBySyncDevPrivate::dynchkBuffers()':
>   ../Tn/TFileBySyncDev.cxx:133: warning: format '%d' expects type 'int',
> but argument 2 has type 'size_t'
>   ../Tn/TFileBySyncDev.cxx: In member function
> 'FX::FXIPCChannel::HandledCode
> Tn::TFileBySyncDevPrivate::msgReceived(FX::FXIPCMsg*)':
>   ../Tn/TFileBySyncDev.cxx:260: warning: converting negative value
> '-0x00000000000000001' to 'unsigned int'
>   scons: *** [Debug_g++_x64_0/main.o] Error 1
>   scons: building terminated because of errors.

Fixed.

> > If ControlPanel.cpp defines its own DEFAULT_SPACING, it will need
> > changing. I fixed the QSSLDevice.h problem by renaming None to
> > NoEncryption. It's in SVN.

Fixed this.

> >> 3. groupbox.cpp doesn't compile because of conflicting definitions of
> >> timeval shown below.
> > Hopefully fixed in SVN but not tested.
>
> This not fixed either. See 3. above

Fixed this.

> >> 4. iconlist.cpp builds, but on running produces a bunch of assert
> >> messages.
> >>
> >> TYPE:SEL_UPDATE              ID:1     SENDER: FXIconList      PTR:
> >> 0x00000000 #1   src/FXDebugTarget.cpp:155:
> >> FXASSERT(ARRAYNUMBER(messageTypeName)==SEL_LAST) failed.
> >> 2   Deleted secure heap
> >>
> >> Unhandled Signal 0x2 (User interrupt)
> >>     at address (nil) - immediate exit!
> >
> > Dunno about this one.

Fixed the assertion error.

> >> 5. imageviewer.cpp builds, but on running and selecting a gif file, it
> >> aborts with an error below (the first two exceptions are at startup).
> >>
> >> [jay@localhost tests]$ ./imageviewer
> >> FXApp: Using font 'luxi sans,80,normal,normal' for normal font
> >> FXException id 1 created, 'File '/home/jay/.foxrc/FoxTest/FoxTest' not
> >> found' at line 275 in src/QFile.cxx thread -1425916512
> >> FXException id 2 created, 'File '/home/jay/.foxrc/FoxTest/ImageViewer'
> >> not
> >> found' at line 275 in src/QFile.cxx thread -1425916512
> >> Deleted secure heap
> >>
> >> Unhandled Signal 0xb (Segmentation fault [Address not mapped to object])
> >>     at address (nil) - immediate exit!
> >
> > Oh dear. I will investigate when I next get time.

Fixed.

> >> 6.memmap.cpp fails to build.  I haven't looked into this.
> >>
> >> memmap.o(.text+0xcc): In function `main':
> >> /home/jay/tnfox/TnFOX/fox_tests/tests/memmap.cpp:52: undefined reference
> >> to `FX::FXMemMap::FXMemMap()'
> >
> > It should work if you enable the FOX compat layer in config.py.

Tested this and indeed it does work. Did you compile your TnFOX
library with the compat layer on?

Cheers,
Niall





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Tnfox-discussion mailing list
Tnfox-discussion@...
https://lists.sourceforge.net/lists/listinfo/tnfox-discussion

Parent Message unknown Re: build error on FXApp.cpp

by Niall Douglas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 26 Feb 2006 at 21:11, jayn@... wrote:

> I see now that I did have the Fox compatibility definition in the
> SConstruct file for the fox_tests that I sent you, and so that was the
> problem with image.cpp that I sent.  But I see that gltest.cpp still fails
> in both cases, as well as memmap.cpp.
>
> Without FX_FOXCOMPAT defined, these  four fail
> 1. gltest.cpp  gltest.cpp:163: error: call of overloaded 'strdup(const
> char*&)' is ambiguous
>
> 2. memmap.cpp memmap.cpp:52: error: 'FXMemMap' was not declared in this scope
>
> 3. imageviewer.cpp imageviewer.cpp:522: error: 'FXFileStream' was not
> declared in this scope
>
> 4. image.cpp image.cpp:363: error: 'FXFileStream' was not declared in this
> scope

Yeah, FXFileStream and FXMemMap are among the classes only supported
with the FX_FOXCOMPAT option. I put a note about this in
foxtests/!ReadmeFirst.txt

> With FX_FOXCOMPAT defined, adding the line below to your SConscript
> env['CPPDEFINES']+=[ "FX_FOXCOMPAT" ]
> only these two fail, but I'm guessing the problem may be that the entire
> library needs to be rebuilt with that FX_FOXCOMPAT defined.  Is that
> right?

Yes, the entire library needs to be rebuilt. It's easier just to set
the option inside config.py rather than hack the SConstruct files.

> 1. gltest.cpp ... the strdup problem
>
> 2. memmap.cpp ... memmap.cpp:52: undefined reference to
> `FX::FXMemMap::FXMemMap()'
>
>
> I'm not sure the compatibility option is necessary for these examples.
> I'll look at what changes are required to fix the 4 examples so that they
> work with FX_FOXCOMPAT undefined.

Well, I'm hesitant to change the code too much. FXMemMap should be
replaced with QMemMap which probably means rewriting the test. I
think that can't be ported.

FXFileStream is much easier - if you use FXFile plus a FXStream, then
both of these are present without FX_FOXCOMPAT and you're still not
using any TnFOX-specific code.

As far as the strdup problem in gltest.cpp, I'm definitely not
getting that on either SuSE 10 or Windows anymore. Of course, if
you're still having a problem, a simple FX::strdup may be the only
answer.

Cheers,
Niall





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Tnfox-discussion mailing list
Tnfox-discussion@...
https://lists.sourceforge.net/lists/listinfo/tnfox-discussion