On Sunday 19 August 2012 19:03:09 Albert Astals Cid wrote:
> El Diumenge, 19 d'agost de 2012, a les 18:14:54, Giacomo Alzetta va 
escriure:
> > I'm trying to write a simple KRunner plug-in, but I'm not able to compile
> > it.
> > 
> > The plug-in is really simple and follows the example that you can find
> > here:
> > 
http://techbase.kde.org/Development/Tutorials/Plasma/AbstractRunner#Abstr
> > ac t
> > 
> > My code can be found here:
> > 
http://techbase.kde.org/Development/Tutorials/Plasma/AbstractRunner#Abstra
> > ct
> Wrong url?
> 
> > Also the CMakeLists.txt file is quite simple:
> > project(editdistanceplugin)
> > 
> > set(KDE_MIN_VERSION "4.3.60")
> > find_package(KDE4 REQUIRED)
> > include(KDE4Defaults)
> > include(MacroLibrary)
> > 
> > add_definitions(${QT_DEFINITIONS}, ${KDE4_DEFINITIONS})
> > include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
> > ${KDE4_INCLUDES})
> > 
> > 
> > set(editdistanceplugin_SRCS src/editdistancerunner.cpp)
> > 
> > 
> > kde4_add_plugin(plasma_runner_editdistance_plugin
> > ${editdistanceplugin_SRCS})
> > target_link_libraries(plasma_runner_editdistance_plugin
> > ${KDE4_PLASMA_LIBS})
> > 
> > 
> > install(TARGETS plasma_runner_editdistance_plugin DESTINATION
> > ${PLUGIN_INSTALL_DIR})
> > install(FILES plasma-runner-editdistance-plugin.desktop DESTINATION
> > ${SERVICES_INSTALL_DIR})
> > 
> > 
> > Now when compiling the project, cmake creates all the files without
> > problems: giacomo@jack-laptop:~/Progetti/EditDistancePlugin/build$ 
cmake
> > ..
> > -- The C compiler identification is GNU
> > [...]
> > -- Found automoc4: /usr/bin/automoc4
> > -- Configuring done
> > -- Generating done
> > -- Build files have been written to:
> > /home/giacomo/Progetti/EditDistancePlugin/build
> > 
> > 
> > but then calling "make" results in this error:
> > giacomo@jack-laptop:~/Progetti/EditDistancePlugin/build$ make
> > Scanning dependencies of target 
plasma_runner_editdistance_plugin_automoc
> > Generating editdistancerunner.moc
> > [  0%] Built target plasma_runner_editdistance_plugin_automoc
> > Scanning dependencies of target plasma_runner_editdistance_plugin
> > [ 50%] Building CXX object
> > 
CMakeFiles/plasma_runner_editdistance_plugin.dir/plasma_runner_editdistanc
> > e_ plugin_automoc.o c++: error: ,: No such file or directory
> 
> Seems like if somewhere you say that you have a source file named "," and
> g++ is failing to find/compile it.
> 
> Cheers,
>   Albert
> 
> > make[2]: ***
> > 
[CMakeFiles/plasma_runner_editdistance_plugin.dir/plasma_runner_editdistan
> > ce _plugin_automoc.o] Error 1
> > make[1]: *** [CMakeFiles/plasma_runner_editdistance_plugin.dir/all] Error
> > 2
> > make: *** [all] Error 2
> > 
> > It's already some time that I try to figure this out, but I don't get what
> > I'm doing wrong.
> > 
> > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> > >> unsubscribe
> > >> <<
> >> 
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
> >> <<

Damn, I found out I wrote:

add_definitions(${QT_DEFINITIONS}, ${KDE4_DEFINITIONS})

instead of:

add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})

Now I'm getting some more compiler erros, but I think I can sort them out.
Eventually I'll reply again with more information.

Thank you a lot anyway.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to