gcc-4.1 and denormgen

Informations, Help and general talk around the Normal and Displacement Map Generator Tool.
Post Reply
mattepiu
First Steps
Posts: 6
Joined: Wed May 10, 2006 5:09 pm

gcc-4.1 and denormgen

Post by mattepiu » Wed May 10, 2006 6:06 pm

I'm planning to put together some tools for artist to produce dot3
bumpmapped meshes/ game contents in linux, and Denormgen would be
really necessary since the only other method, Blender +BRayBaker,
was found to have bad results for organic meshes.....

However I found some nasty issues to compile denormgen with gcc-4.1:

1) the only fox version compatible is fox-1.6, my only fix was to replace fox-1.4 with fox-1.6 in the configure script.

2) even so, make process has errors and denormgen wouldn't compile:

Code: Select all

if g++ -DHAVE_CONFIG_H -I. -I. -I.    -D_OS_UNIX_  -g -O2 -MT ngDialogTextureSize.o -MD -MP -MF ".deps/ngDialogTextureSize.Tpo" \
          -c -o ngDialogTextureSize.o `test -f './gui/ngDialogTextureSize.cpp' || echo './'`./gui/ngDialogTextureSize.cpp; \
        then mv -f ".deps/ngDialogTextureSize.Tpo" ".deps/ngDialogTextureSize.Po"; \
        else rm -f ".deps/ngDialogTextureSize.Tpo"; exit 1; \
        fi
./gui/ngDialogTextureSize.h:37: error: expected class-name before '{' token
./gui/ngDialogTextureSize.h:38: error: ISO C++ forbids declaration of 'FXDECLARE' with no type
./gui/ngDialogTextureSize.h:39: error: expected ';' before 'protected'
./gui/ngDialogTextureSize.h:43: error: 'FXDialogBox' has not been declared
./gui/ngDialogTextureSize.h:55: error: ISO C++ forbids declaration of 'FXComboBox' with no type
./gui/ngDialogTextureSize.h:55: error: expected ';' before '*' token
./gui/ngDialogTextureSize.h:56: error: ISO C++ forbids declaration of 'FXTextField' with no type
./gui/ngDialogTextureSize.h:56: error: expected ';' before '*' token
./gui/ngDialogTextureSize.h:57: error: ISO C++ forbids declaration of 'FXTextField' with no type
./gui/ngDialogTextureSize.h:57: error: expected ';' before '*' token
./gui/ngDialogTextureSize.h:63: error: expected `)' before '*' token
./gui/ngDialogTextureSize.h:66: error: 'FXObject' has not been declared
./gui/ngDialogTextureSize.h:66: error: 'FXSelector' has not been declared
./gui/ngDialogTextureSize.h:67: error: 'FXObject' has not been declared
./gui/ngDialogTextureSize.h:67: error: 'FXSelector' has not been declared
./gui/ngDialogTextureSize.cpp:37: error: expected constructor, destructor, or type conversion before 'ngDialogTextureSizeMap'
./gui/ngDialogTextureSize.cpp:46: error: 'FXDialogBox' has not been declared
./gui/ngDialogTextureSize.cpp:46: error: 'ngDialogTextureSizeMap' has not been declared
./gui/ngDialogTextureSize.cpp:46: error: 'ARRAYNUMBER' has not been declared
./gui/ngDialogTextureSize.cpp:49: error: expected constructor, destructor, or type conversion before 'ngDialogTextureSize'
./gui/ngDialogTextureSize.cpp:51: error: expected `)' before '*' token
./gui/ngDialogTextureSize.cpp:116: error: 'long int ngDialogTextureSize::onCBTextureChanged' is not a static member of 'class ngDialogTextureSize'
./gui/ngDialogTextureSize.cpp:116: error: 'FXObject' was not declared in this scope
./gui/ngDialogTextureSize.cpp:116: error: 'sender' was not declared in this scope
./gui/ngDialogTextureSize.cpp:116: error: 'FXSelector' was not declared in this scope
./gui/ngDialogTextureSize.cpp:116: error: expected primary-expression before 'void'
./gui/ngDialogTextureSize.cpp:116: error: initializer expression list treated as compound expression
./gui/ngDialogTextureSize.cpp:116: error: expected ',' or ';' before '{' token
./gui/ngDialogTextureSize.cpp:120: error: 'long int ngDialogTextureSize::onBtnAccept' is not a static member of 'class ngDialogTextureSize'
./gui/ngDialogTextureSize.cpp:120: error: 'FXObject' was not declared in this scope
./gui/ngDialogTextureSize.cpp:120: error: 'sender' was not declared in this scope
./gui/ngDialogTextureSize.cpp:120: error: 'FXSelector' was not declared in this scope
./gui/ngDialogTextureSize.cpp:120: error: expected primary-expression before 'void'
./gui/ngDialogTextureSize.cpp:120: error: initializer expression list treated as compound expression
./gui/ngDialogTextureSize.cpp:120: error: expected ',' or ';' before '{' token
./gui/ngDialogTextureSize.cpp: In member function 'void ngDialogTextureSize::StoreDimensions()':
./gui/ngDialogTextureSize.cpp:135: error: 'pComboTexture' was not declared in this scope
./gui/ngDialogTextureSize.cpp:139: error: 'pEditWidth' was not declared in this scope
./gui/ngDialogTextureSize.cpp:140: error: 'pEditHeight' was not declared in this scope
make[2]: *** [ngDialogTextureSize.o] Error 1
make[2]: Leaving directory `/home/matte/MyDownloads/denormgen-1.3/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/matte/MyDownloads/denormgen-1.3/src'
make: *** [all-recursive] Error 1
the issue is obviously at src/gui/ngDialogTextureSize.h line 37,
but I wasn't able to find the classname it wants before the { symbol....
I just found THIS related topic, but can't fix myself, sorry.

User avatar
Dragonlord
Forum Administrator
Posts: 609
Joined: Fri Jul 30, 2004 4:30 pm
Location: Switzerland
Contact:

Post by Dragonlord » Wed May 10, 2006 10:44 pm

you said you replaced 1.4 with 1.6 ? where did you all change it? as if you touched the include statement you end up skipping the initializer. can you please post the modified code portion?
Image
Oh to be a dragon, of silkworm size or immense...

mattepiu
First Steps
Posts: 6
Joined: Wed May 10, 2006 5:09 pm

Post by mattepiu » Thu May 11, 2006 9:07 am

Dragonlord wrote:you said you replaced 1.4 with 1.6 ? where did you all change it? as if you touched the include statement you end up skipping the initializer. can you please post the modified code portion?
I just changed the configure script:

Code: Select all

# check for fox toolkit
#########################

for ac_header in fox-1.6/fx.h
do
.....
_ACEOF
 FOX_LIBS=-lFOX-1.6; FOX_VERSION=1.6
fi

done


for ac_header in fox-1.3/fx.h
(Is just a bare replace of fox-1.4 with fox-1.6, however the compilation issue found is typical of gcc-4.1 porting, plenty of other similar cases...)

User avatar
Dragonlord
Forum Administrator
Posts: 609
Joined: Fri Jul 30, 2004 4:30 pm
Location: Switzerland
Contact:

Post by Dragonlord » Fri May 12, 2006 1:01 am

this won't work. this code portion is there to define a symbol used to #ifdef select the right headers. simply altering the value will make you skip the fox headers altogether. if you want to compile against 1.6 you have to do the following:

1) configure.ac
*FIND*:

Code: Select all

AC_CHECK_HEADERS([fox-1.4/fx.h], [FOX_LIBS=-lFOX-1.4; FOX_VERSION=1.4])
*ADD_ABOVE*:

Code: Select all

AC_CHECK_HEADERS([fox-1.6/fx.h], [FOX_LIBS=-lFOX-1.6; FOX_VERSION=1.6])
2) src/foxtoolkit.h
*FIND*:

Code: Select all

#elif defined(HAVE_FOX_1_4_FX_H)
#	include <fox-1.4/fx.h>
#	include <fox-1.4/fx3d.h>
*ADD_BELOW*:

Code: Select all

#elif defined(HAVE_FOX_1_6_FX_H)
#	include <fox-1.6/fx.h>
#	include <fox-1.6/fx3d.h>
i hope this works
Image
Oh to be a dragon, of silkworm size or immense...

mattepiu
First Steps
Posts: 6
Joined: Wed May 10, 2006 5:09 pm

Post by mattepiu » Fri May 12, 2006 9:35 am

Thank you, this way is surely better. However compile would fail the same
way described above, it's some gcc-4.1 porting issue....

User avatar
Dragonlord
Forum Administrator
Posts: 609
Joined: Fri Jul 30, 2004 4:30 pm
Location: Switzerland
Contact:

Post by Dragonlord » Fri May 12, 2006 12:04 pm

try adding the include statement directly into the source file after the other includes. although the new gcc is a bit of a prick this kind of error usually only happens if you missed the include files. if that fails too then definitly there's something wrong with the gcc.
Image
Oh to be a dragon, of silkworm size or immense...

mattepiu
First Steps
Posts: 6
Joined: Wed May 10, 2006 5:09 pm

Post by mattepiu » Fri May 12, 2006 7:43 pm

no joy, even with the latest patchset.... I'll wait for some app having similar
issue to fix, for sure I know there's kde-base but I'm unable to find the
patches used.

Post Reply