Re: [Qt-creator] CMake and include paths
Wow, thank you! I didn't know there was a FIND_PACKAGE module for libxml2. This makes things much easier. And Creator seems to recognize the INCLUDE_DIRECTORIES command, so it parses the header files. For the record, my experimental CMakeLists.txt looks like this: CMAKE_MINIMUM_REQUIRED (VERSION 2.6) PROJECT (foobar) SET (SRCS main.cpp) ADD_EXECUTABLE (foobar ${SRCS}) FIND_PACKAGE (LibXml2 REQUIRED) INCLUDE_DIRECTORIES (SYSTEM ${LIBXML2_INCLUDE_DIR}) ADD_DEFINITIONS (${LIBXML2_DEFINITIONS}) TARGET_LINK_LIBRARIES (foobar ${LIBXML2_LIBRARIES}) I encountered something strange though: I saved everything and rebuilt the project, and autocompletion still didn't offer the xmlParseFile() function (it's in libxml/parser.h), although some of the other symbols showed up from the header file. I tried Tools C++ Update code model, but nothing happened. So I opened the header file in the editor then closed it, and that solved the problem: the completion list became complete. (I don't know if it counts, but the declaration of xmlParseFile() is inside an #ifdef block in the header file). Qt Creator version: 1.3.0 (from revision 932f460d25). Again, thanks for the help! -- Tamás 2010/3/10 Peter Kümmel syntheti...@gmx.net: Am Mittwoch, den 10.03.2010, 03:27 +0100 schrieb Tamás Kiss: Hi! I tried to create a CMake project to experiment with libxml2 on Linux, and I ran into the following problem: The libxml2 header files are in the /usr/include/libxml2/ directory which is not among the default system include paths, so I had to feed the CMAKE_CXX_FLAGS variable with the output of the xml2-config --cflags command (this generates -I/usr/include/libxml2). The problem is that the IDE is unaware of this new include path, so it doesn't find the libxml2 header files. Because of this, the editor underlines everything as undeclared identifier, code completion doesn't work, so it's actually much harder to work in Creator than in a plain text editor. (Compilation works fine). My question: is there a way to tell the IDE where to look for the header files? Or in CMake projects this is not implemented yet? Thanks, Add 'include_directories(usr/include/libxml2)' to you CMakeLists.txt. When you use the 'find_package' command to find libxml2 then there is a variable which points to the headers. Peter ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] Including MinQW system headers
FYI, my probably was actually my own time.h in one of my added include paths. I see that the GCC documentation says that the -I option adds include paths ahead of the system includes, but I always thought that using the angle-bracket form of #include only search system include paths, not user include paths. Apparently that's not true. Does anyone have any clarification to offer? On Thu, Mar 4, 2010 at 9:11 AM, Bryce Schober bryce.scho...@gmail.comwrote: I'm trying to use Qt creator on windows to build a project with pre-existing C files that include the standard system headers time.h and sys/time.h for functions like gmtime() and strftime(). I have set up my project as a Qt console application. The compilation doesn't complain about the included headers, but complains that my call of gmtime() is an implicit declaration.. I dug around in the install directory, and found mingw/include/time.h. I actually even put some random text at the beginning of the header, even before the include guards to see if it failed, and it doesn't. It seems like something in the build tool-chain is silently ignoring my inclusion of the system time headers. Any suggestions here? -- Bryce Schober ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
[Qt-creator] QT-Creator project management - looking for advice
I am looking at QT Creator as a possible platform for teaching C++ to High School Students. I am the software mentor for a FIRST Robotics team that uses C++ to program its robots. For the actual robot programming, we use Eclipse (Wind River Workbench) but that environment is limited by the amount of robot hardware we have. I would also like to have a system that the students can use in their home environments. QT looks good for this, since it is self contained and easy to install. Here is what I would like to do. I'm looking for suggestions on how to do it (or alternatives) - I create an example project that illustrate particular concepts, and assign tasks based on the example. - I give each programming student a copy of the project and an assignment using that project. - The students complete their tasks and submit copies of their projects to me for evaluation. - I build and execute the returned projects so I can evaluate both the operation and the coding. The problem that I am having is with project management. I'm working through the example projects but I'm not seeing how to copy projects, or relocate them. I need to come up with a system that will allow many similar projects to not interfere with each other, and promote ease of relocation as the projects are moved from machine to machine. Suggestions, anecdotes of experience, and pointers to specific documentation sections or books on QT will be greatly appreciated. Thanks for your help. Eric Anderson ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] QT-Creator project management - looking for advice
The problem that I am having is with project management. I'm working through the example projects but I'm not seeing how to copy projects, or relocate them. I need to come up with a system that will allow many similar projects to not interfere with each other, and promote ease of relocation as the projects are moved from machine to machine. Well just use standard file system moves. Make sure to not copy (or rather delete) the .user files as those contain machine and user specific settings. Otherwise there shouldn't be a problem at all. daniel ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] QT-Creator project management - looking for advice
make distclean will clean the target and the makefile(s) too. On Wed, Mar 10, 2010 at 4:49 PM, August Hörandl august.hoera...@gmx.at wrote: Am Mittwoch 10 März 2010 schrieb Eric Anderson: Suggestions, anecdotes of experience, and pointers to specific documentation sections or books on QT will be greatly appreciated. I am a teacher and some colleges an i use qtcreator for some time now: Just tell the students to do build/clean all before submitting the whole directory as a zip, rar or tar.gz file. You have to delete the Makefile (which gets not cleaned) or call build/run qmake to use the project. It is possible, at least in linux, to use make dist to create a .tar.gz file -- but this rather unusable because it includes a lot of unneeded stuff, but it is simple to use on the command line, includes the version number, but there is no menu entry in qtcreator. Another suggestion would be to use git, subversion or any other version control system. You get the additional benefit of teaching about version control, the pupils don't lose work and sometimes the revision history gives some hints about the connections between different students. hth Gustl -- August Hörandl august.hoera...@gmx.at Free users may ever have a choice... others never ! Free software for people with free minds. ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
[Qt-creator] qmake/moc goes into endless loop when files have a timestamp in the future
Hi I'm not sure if the issue is with creator or with the qt tools (qmake moc) so I'm giving both lists a try. I accidentally set my system time to a date in the future and only realized it a day or so later. After I changed back the time and try to build my project, the tools goes into a endless loop. See the the qmake output below for an example: Running build steps for project ObjManagementLib... Starting: c:/tools/qt/2010.01/qt/bin/qmake.exe D:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/ObjManagementLib.pro -spec win32-g++ -r Reading D:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/source/source.pro Reading D:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/examples/examples.pro Exited with code 0. Starting: C:/Tools/Qt/2010.01/mingw/bin/mingw32-make.exe -w mingw32-make: Entering directory `D:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib' cd source/ C:/Tools/Qt/2010.01/mingw/bin/mingw32-make -f Makefile mingw32-make[1]: Entering directory `d:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/source' c:/tools/qt/2010.01/qt/bin/qmake.exe -spec c:/Tools/Qt/2010.01/qt/mkspecs/win32-g++ -win32 -o Makefile source.pro mingw32-make[1]: Leaving directory `d:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/source' mingw32-make[1]: Entering directory `d:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/source' c:/tools/qt/2010.01/qt/bin/qmake.exe -spec c:/Tools/Qt/2010.01/qt/mkspecs/win32-g++ -win32 -o Makefile source.pro mingw32-make[1]: Leaving directory `d:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/source' mingw32-make[1]: Entering directory `d:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/source' c:/tools/qt/2010.01/qt/bin/qmake.exe -spec c:/Tools/Qt/2010.01/qt/mkspecs/win32-g++ -win32 -o Makefile source.pro mingw32-make[1]: Leaving directory `d:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/source' mingw32-make[1]: Entering directory `d:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/source' c:/tools/qt/2010.01/qt/bin/qmake.exe -spec c:/Tools/Qt/2010.01/qt/mkspecs/win32-g++ -win32 -o Makefile source.pro mingw32-make[1]: Leaving directory `d:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/source' mingw32-make[1]: Entering directory `d:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/source' c:/tools/qt/2010.01/qt/bin/qmake.exe -spec c:/Tools/Qt/2010.01/qt/mkspecs/win32-g++ -win32 -o Makefile source.pro mingw32-make[1]: Leaving directory `d:/ScinericSoftware/Products/Qtilities/trunk/libraries/ObjManagementLib/source' I think it is because some files have a timestap in the future. Is there a way to get around this? Or should I manually edit all files with the date set back? I tried to set the attributes of all files with the date set back but that does not do the trick. Using: Qt Creator 1.3.0 Qt 4.6.1 Thanks for your help, Jaco ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator