LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Many errors when 'make'ing (example: error: syntax error before `::' token) (https://www.linuxquestions.org/questions/linux-software-2/many-errors-when-makeing-example-error-syntax-error-before-%60-token-234407/)

darkblade 09-23-2004 03:35 PM

Many errors when 'make'ing (example: error: syntax error before `::' token)
 
Hey guys, i am having a heck of a time compiling, i am a newb to linux, and if this belongs in the newbie forum please forgive me, i wasn't sure where exactly to put this. I am trying to install Kpager2 for Kicker in KDE 3.3 (http://www.kde-look.org/content/show.php?content=7120). After downloading countless libraries and dev files i finally got through the ./configure process. I then moved on to 'make'. The following are the errors produced at the end of the make process. I am not sure if I need to post the entire make process, i assume i don't.

Code:

/usr/share/qt3/bin/moc ./kpagermainwin.h -o kpagermainwin.moc.cpp
if /bin/sh ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/kde -I/usr/share/qt3/include -I/usr/X11R6/include  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common  -MT kpagermainwin.moc.lo -MD -MP -MF ".deps/kpagermainwin.moc.Tpo" \
  -c -o kpagermainwin.moc.lo `test -f 'kpagermainwin.moc.cpp' || echo './'`kpagermainwin.moc.cpp; \
then mv -f ".deps/kpagermainwin.moc.Tpo" ".deps/kpagermainwin.moc.Plo"; \
else rm -f ".deps/kpagermainwin.moc.Tpo"; exit 1; \
fi
kpagermainwin.moc.cpp:22: error: syntax error before `::' token
kpagermainwin.moc.cpp:27: error: syntax error before `::' token
kpagermainwin.moc.cpp:28: error: `KPagerMainWindow' was not declared in this
  scope
kpagermainwin.moc.cpp:28: error: parse error before `::' token
kpagermainwin.moc.cpp:31: error: syntax error before `::' token
kpagermainwin.moc.cpp:39: error: syntax error before `::' token
kpagermainwin.moc.cpp:50: error: syntax error before `::' token
kpagermainwin.moc.cpp:59: error: ISO C++ forbids declaration of `metaObj' with
  no type
kpagermainwin.moc.cpp:67: error: invalid conversion from `QMetaObject*' to `int
  '
kpagermainwin.moc.cpp:68: error: syntax error before `.' token
kpagermainwin.moc.cpp:72: error: syntax error before `::' token
kpagermainwin.moc.cpp:81: error: syntax error before `::' token
kpagermainwin.moc.cpp:91: error: syntax error before `::' token
kpagermainwin.moc.cpp:97: error: syntax error before `::' token
kpagermainwin.moc.cpp:102: error: syntax error before `::' token
kpagermainwin.moc.cpp:28: warning: `QMetaObjectCleanUp
  cleanUp_KPagerMainWindow(...)' declared `static' but never defined
make[2]: *** [kpagermainwin.moc.lo] Error 1
make[2]: Leaving directory `/home/dark/kpager2-0.5.2/kpager2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dark/kpager2-0.5.2/kpager2'
make: *** [all] Error 2

ANY help would be greatly appreciated, I hope the answer isn't staring me in the face, I would feel dumb if that were the case.
Thanks guys

foo_bar_foo 09-23-2004 04:11 PM

i see this on kde-apps.org

Quote:


If there are any problems during compilation in kpagermainwin.moc.cpp, insert at the very beginning of this file:
o #include "version.h"
o #ifndef KPAGER_IS_APPLET
and at the very end:
o #endif
(It seems the moc compiler has problems in understanding #ifdefs).

(they don't mean to include the "o"s in the file)

darkblade 09-23-2004 04:27 PM

hey, yeah, i added those to the file, and i still get the exact same errors :(

storyteller 10-08-2004 11:00 PM

You will notice that there is a 2nd file named kpagermainwin.moc.cpp in the src folder. It is this file that must be appended.
I had the same issue ;-)

darkblade 10-08-2004 11:50 PM

hey storyteller, thanks for the reply, although i'm a complete newb to linux and i'm not sure what you mean by appended :( could you explain please? :)

storyteller 03-02-2005 04:00 PM

If there are any problems during compilation in kpagermainwin.moc.cpp, insert at the very beginning of this file:
o #include "version.h"
o #ifndef KPAGER_IS_APPLET
and at the very end:
o #endif

I believe you are attempting to do this to the wrong file. You will find 2 files named kpagermainwin.moc.cpp: One in the top kpager2 folder and one in the src subfolder. It is the one in the subfolder that must be edited as above :)


All times are GMT -5. The time now is 02:59 PM.