when I was using Redhat linux os for a project I had to work with kdevelop IDE.the build system was cmake.there were some 3rd party libraries like qwt, glut&glew also included in the project.for loading the project into kdevelop first the cmake has to generate the make files which the kdevelop will recognise."Cmake -G kDevelop3" command will generate the specific files required for the IDE.then it is easy to import the project into kdevelop.debugging is easy in kdevelop as the variable values are shown when Hovered, and version control is also easy.compare it with Qtcreator for the pros and cons.
Thursday, June 27, 2013
Friday, June 14, 2013
SVN setup on a Local Machine
SVN setup on a Local Machine.
Sometimes it is required to setup a svn repository on a local machine, in some cases the Linux filesystem will be on a shared drive.Generally SVN needs URL terminology for referring to the repository,so we will setup a repository using a file system access.(file://).
The following step creates the repository.
svnadmin create --fs-type fsfs /redhat/svn/projectname/
The above project name directory is filled with some files and directories which are necessary for a repository customization etc.
The following step Imports an existing project.and generally it is a custom for svn projects for this kind of directory structure.
tags..
branches..
trunk..
here in the trunk directory the actual project files are present.once your project is ordered in this fashion and cleansed of any unwanted things like binaries and generated files or compiled code.
svn import /path/to/project/ file:///redhat/svn/projectname/trunk -m 'Initial import'
Here if the SVN_EDITOR and other variables are not set then a error message will be reported.
so -m option with the commit message “Initial Import” will avoid the error message.
The following step creates the subversion specific and version aware working copy.
svn checkout file:///redhat/svn/projectname .
The above step checkout(created)a copy of project in to the current directory “.”(dot).
there will be a .svn direcory in the working copy
The working copy information can be obtained by the info command.
The below command gives the details of the version controlled project copy.
svn info
Handling your project (editing and adding files).in your working copy
After adding a class or any new files in your project when you type “svn status” there will be response for the files that are present in your working copy.
if there is a “?” then it is a new file.
if there is “M” then it is a modified file.
svn status
? project/class.cpp
? project/class.h
M project/main.cpp
Now add the two files class.cpp and class.h to the svn using the following command.
svn add class.cpp class.h
Now the two files are under version control which can be confirmed by the command “svn status”.
when everything is fine compiling and working and you have decided for the commit do it the same way using the below command.
svn ci -m “Added a new class”
svn checkout -r 4 file:///redhat/svn/projectname
the above command will retrieve the particular version of your project which is revision 4,it can also mean,that you change the code to that date on which project is versioned as 4.
if we want to know the the information of individual files which are under version control we can do so by doing this.
svn info projectname/main.cpp
Path: /redhat/svn/projectname/main.cpp
Name: main.cpp
URL: file:///redhat/svn/projectname/main.cpp
Revision: 3
In the same way for finding the version of class.cpp and class.h do so by
svn info projectname/class.cpp
Path: /redhat/svn/projectname/class.cpp
Name: class.cpp
URL: file:///redhat/svn/projectname/class.cpp
Revision: 4
Other commands
---------------
revert undo all changes in the current directory.
update fetch all the changes committed from another working directory.
diff show the difference between the files in the current directory across the versions.
remote respository of your project will be accessed in the following way.
file:///redhat/svn/projectname ⇐===> svn+ssh://url.of.desktop/redhat/svn/projectname.
Monday, December 10, 2012
libQtGui.so: undefined reference to `FcFreeTypeQueryFace'
RedHat64 + qt sdk-offline-linux-x86_64 +FcFreeTypeQueryFace+Building application yields libQtGui.so: undefined reference to `FcFreeTypeQueryFace'
Cause for compiling the sources.
When my office have blocked access to internet for all RedHat workstations ,i could not download packages,and it was not possible to download from the PC side as well,because of the company security policies.so i had to download it from somewhere, get it,and compile in the workstation.
I started with invoking Qt_SDK_Lin64_offline_v1_1_2_en.run file for installing the SDK like this and got this error,
./Qt_SDK_Lin64_offline_v1_1_2_en.run: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./Qt_SDK_Lin64_offline_v1_1_2_en.run)
so i started compiling gcc4.3.2 and its dependent sources(mpfr-2.4.2.tar,gmp-4.3.2.tar,mpc-0.8.1.tar)
-----------------------------------------------------------------------------------------------------
1.mpfr-2.4.2.tar
mkdir mpfrbuild ; cd mpfrbuild ; ../mpfr-2.4.2/./configure --prefix=$PWD ;make -j8 && make install
2.gmp-4.3.2.tar
mkdir gmpbuild ; cd gmpbuild ; ../gmp-4.3.2/./configure --prefix=$PWD ;make -j8 && make install
3.mpc-0.8.1.tar
mkdir mpcbuild ; cd mpcbuild ; ../mpc-0.8.1/./configure --with-gmp-lib=/gmpbuild/lib --with-gmp-include=/gmpbuild/include --with-mpfr-include=/mpfrbuild/include --with-mpfr-lib=/mpfrbuild/lib --with-mpc-include=/mpcbuild/include --with-mpc-lib=/mpcbuild/lib --prefix=$PWD ;make -j8 && make install
4 Configuring and compiling the GCC 4.6.3
------------------------------------------
mkdir gcc463build ; cd gcc463build ; ../gcc-4.6.3/./configure --with-gmp-lib=/gmpbuild/lib --with-gmp-include=/gmpbuild/include --with-mpfr-include=/mpfrbuild/include --with-mpfr-lib=/mpfrbuild/lib --with-mpc-include=/mpcbuild/include --with-mpc-lib=/mpcbuild/lib --enable-languages=c,c++ --prefix=$PWD ;make -j8 && make install
Errors when compiling GCC sources
-------------------------------------
checking for suffix of object files... configure: error: in `../x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
By adding mpc,mpfr,gmp Library paths to the LD_LIBRARY_PATH the make continues
Download fontconfig-2.4.2.tar.gz+ make;make install
and setenv /PATH/TO/THE/LIBRARY:$LD_LIBRARY_PATH
or LIBS += -L/PATH/TO/fontconfig-2.4.2/lib in the .pro or CMakeLists.txt
more comments and information is available at http://theitdepartment.wordpress.com/2009/03/15/centos-qt-fcfreetypequeryface/
Cause for compiling the sources.
When my office have blocked access to internet for all RedHat workstations ,i could not download packages,and it was not possible to download from the PC side as well,because of the company security policies.so i had to download it from somewhere, get it,and compile in the workstation.
I started with invoking Qt_SDK_Lin64_offline_v1_1_2_en.run file for installing the SDK like this and got this error,
./Qt_SDK_Lin64_offline_v1_1_2_en.run: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./Qt_SDK_Lin64_offline_v1_1_2_en.run)
so i started compiling gcc4.3.2 and its dependent sources(mpfr-2.4.2.tar,gmp-4.3.2.tar,mpc-0.8.1.tar)
-----------------------------------------------------------------------------------------------------
1.mpfr-2.4.2.tar
mkdir mpfrbuild ; cd mpfrbuild ; ../mpfr-2.4.2/./configure --prefix=$PWD ;make -j8 && make install
2.gmp-4.3.2.tar
mkdir gmpbuild ; cd gmpbuild ; ../gmp-4.3.2/./configure --prefix=$PWD ;make -j8 && make install
3.mpc-0.8.1.tar
mkdir mpcbuild ; cd mpcbuild ; ../mpc-0.8.1/./configure --with-gmp-lib=/gmpbuild/lib --with-gmp-include=/gmpbuild/include --with-mpfr-include=/mpfrbuild/include --with-mpfr-lib=/mpfrbuild/lib --with-mpc-include=/mpcbuild/include --with-mpc-lib=/mpcbuild/lib --prefix=$PWD ;make -j8 && make install
4 Configuring and compiling the GCC 4.6.3
------------------------------------------
mkdir gcc463build ; cd gcc463build ; ../gcc-4.6.3/./configure --with-gmp-lib=/gmpbuild/lib --with-gmp-include=/gmpbuild/include --with-mpfr-include=/mpfrbuild/include --with-mpfr-lib=/mpfrbuild/lib --with-mpc-include=/mpcbuild/include --with-mpc-lib=/mpcbuild/lib --enable-languages=c,c++ --prefix=$PWD ;make -j8 && make install
Errors when compiling GCC sources
-------------------------------------
checking for suffix of object files... configure: error: in `../x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
By adding mpc,mpfr,gmp Library paths to the LD_LIBRARY_PATH the make continues
to do
-----
-----
for this error libQtGui.so: undefined reference to `FcFreeTypeQueryFace'
Download fontconfig-2.4.2.tar.gz+ make;make install
and setenv /PATH/TO/THE/LIBRARY:$LD_LIBRARY_PATH
or LIBS += -L/PATH/TO/fontconfig-2.4.2/lib in the .pro or CMakeLists.txt
more comments and information is available at http://theitdepartment.wordpress.com/2009/03/15/centos-qt-fcfreetypequeryface/
Sunday, August 26, 2012
Qt Tips
How to add QToolbar to the MainWindow using QT Designer.
Method 1
Drag and Drop from the QActionEditor
Create some QActions from Action Editor tab in the designer.Each of these QActions can be edited from their context menu.these can be dragged on to the
default mainToolBar present on the mainWindow.
Method 2
Selet from mainwindow contextmenu
Right-click on the main window and select Add toolbar from the context menu. To add buttons to the toolbar, you must create some QActions. Select the Action
Editor tab (if the tab is nowhere to be seen, go to the view menu and make sure Action Editor is checked), push the create new action button and fill the
form that appears. Then drag your newly created action from the list in the action editor to the toolbar.
Method 3
Writing UI Code in C++
Generally if you write C++ code this can be done in multiple ways using addToolBar();
QToolBar *tool = new QToolBar;
tool->setGeometry(0,0,200,20);
QToolButton *button = new QToolButton;
button->setGeometry(0,0,10,20);
tool->addWidget(button);
If the area is not specified then the toolbar is placed at the end of the current tool bar block.otherwise it will be added to the specified area in the main window.
Eg:-
QToolBar *fileToolBar= addToolBar(Qt::BottomToolBarArea,fileToolBar);
A nice example is available which illustrates, how to code in Qt with C++ is available here.
Thursday, August 23, 2012
What is Opengl and Qt with OpenGL.
What is opengl
OpenGL is the industry’s most widely used 2D and 3D graphics API.
OpenGL is a low level API which requires the programmer to write the exact steps needed to render a scene in a 3d space.
So it is up to the programmer to specify geometry primitives in a 3D space, apply coloring,texturing, lighting effects and render the objects onto the screen.
As OpenGL is "low-level" graphics API, An application using OpengGL must tell the computer how to draw a scene in terms of low level primitives such as vertices, lines and polygons.
For example, to draw a cube, the cube’s eight vertices must be specified.
Imagine attempting to render something as complex as a Cam-shaft using one of these low-level APIs.
As, these APIs are highly sensitive to the order in which functions are called, making direct OpenGL API call is error prone.
So high-level APIs which support object oriented 3D visualization have been developed.
These scene graph APIs allow the programmer to define a scene and then place objects in the scene.
For 2D visualization there is no standard for scenegraph,Qt has QGraphicsView which allows to render the 2d scenes easily using opengl.
For 3D visualization, APIs like Open Inventor and VTK are standard.
OpenGL is cross-platform, but the choice of the widget toolkit that encapsulates the OpenGL scene willl limit the application to a particular platform.
QtOpenGL
Role of Qt.Qt provides the 'glue-code' required to embed an opengl rendered area into a window,With Qt Window System,QWS, the window management,handling events like widget paint event,and user input events like mouse,keyboard events.
with Qt's cross platform API it will be easier for porting the application on to the desired platform.
Not only that any visualization application definitely requires additional APIs to print documents, parse XML, read databases, and use threads,networking, and so on and so forth.
An ideal toolkit should support all these additional utilities and be cross-platform at the same time.
Qt becomes the best choice among the other windowing tool-kits,such as Motif on the X platform, Microsoft Foundation Classes (MFC) under Windows platform,as it supports both the platforms and also many IDE's like VisualStudio,Eclipse,NetBeans.
Not only that Qt has an unique IDE Qt-Creator a versatile cross-platform complete integrated development environment available on Linux, Mac OS X and Windows operating systems.
Thursday, September 15, 2011
Linux Terms and Commands
ext -- Linux Extended filesystem — the original Linux filesystem
ext2 -- Second extended filesystem,Advanced features to ext
ext3 -- Third extended filesystem, supports journaling
ext4 -- Fourth extended filesystem, supports advanced journaling
ntfs -- Support for Microsoft NT filesystem
The Unity -- Desktop on the Ubuntu
Common Linux Directory Names
Directory and its Usage
/
root of the virtual directory, where normally, no files are placed
/bin
binary directory, where many GNU user-level utilities are stored
/boot
boot directory, where boot files are stored
/dev
device directory, where Linux creates device nodes
/etc
system configuration files directory
/home
home directory, where Linux creates user directories
/lib
library directory, where system and application library files are stored
/media
media directory, a common place for mount points used for removable media
/mnt
mount directory, another common place for mount points used for removable media
/opt
optional directory, often used to store third-party software packages and data files
/proc
process directory, where current hardware and process information is stored
/root
root home directory
/sbin
system binary directory, where many GNU admin-level utilities are stored
/run
run directory, where runtime data is held during system operation
/srv
service directory, where local services store their files
/sys
system directory, where system hardware information files are stored
/tmp
temporary directory, where temporary work files can be created and destroyed
/usr
user binary directory, where the bulk of GNU user-level utilities and data files are stored
/var
variable directory, for files that change frequently, such as log files.
cd
pwd
ls
ls -F forward slash after directory name
ls -RF //Excellent ls command,shows full contents including sub directories.
ls -l //Long Listing
File globbing using *
ls -l my_s*t //my_shirt,my_short
How to enable globstar so that you can do things like ls **/*.c
first check your shell version is Bash 4 by
$0 --verion
now set globstar settings by
shopt -s globstar
it is suggested to restart the shell .
The Linux ls command is an essential and very powerful command for daily usage.mainly used for browsing the contents of directories.its power comes when it is used with the
its options to customize the output.
In order to find the last modified/touched file in a directory we can use ls -Al.
if you want only the last four files that are modified in a directory then the following command will help.
satyendra $ ls -Alt | head -4
total 7668
-rw-r--r-- 1 satyendra Administrators 2359296 Sep 21 21:20 ntuser.dat
-rw-r--r-- 1 satyendra Administrators 262144 Sep 21 21:20 ntuser.dat.LOG1
dr-xr-xr-x 0 satyendra Administrators 98304 Sep 21 20:57 Recent
The –t option shows files by the time they are modified.
head -4 takes the input from ls -Alt and shows only the last 3 modified files.
ext2 -- Second extended filesystem,Advanced features to ext
ext3 -- Third extended filesystem, supports journaling
ext4 -- Fourth extended filesystem, supports advanced journaling
ntfs -- Support for Microsoft NT filesystem
The Unity -- Desktop on the Ubuntu
Common Linux Directory Names
Directory and its Usage
/
root of the virtual directory, where normally, no files are placed
/bin
binary directory, where many GNU user-level utilities are stored
/boot
boot directory, where boot files are stored
/dev
device directory, where Linux creates device nodes
/etc
system configuration files directory
/home
home directory, where Linux creates user directories
/lib
library directory, where system and application library files are stored
/media
media directory, a common place for mount points used for removable media
/mnt
mount directory, another common place for mount points used for removable media
/opt
optional directory, often used to store third-party software packages and data files
/proc
process directory, where current hardware and process information is stored
/root
root home directory
/sbin
system binary directory, where many GNU admin-level utilities are stored
/run
run directory, where runtime data is held during system operation
/srv
service directory, where local services store their files
/sys
system directory, where system hardware information files are stored
/tmp
temporary directory, where temporary work files can be created and destroyed
/usr
user binary directory, where the bulk of GNU user-level utilities and data files are stored
/var
variable directory, for files that change frequently, such as log files.
cd
pwd
ls
ls -F forward slash after directory name
ls -RF //Excellent ls command,shows full contents including sub directories.
ls -l //Long Listing
File globbing using *
ls -l my_s*t //my_shirt,my_short
How to enable globstar so that you can do things like ls **/*.c
first check your shell version is Bash 4 by
$0 --verion
now set globstar settings by
shopt -s globstar
it is suggested to restart the shell .
Linux ls command and its importance in daily use.
The Linux ls command is an essential and very powerful command for daily usage.mainly used for browsing the contents of directories.its power comes when it is used with the
its options to customize the output.
In order to find the last modified/touched file in a directory we can use ls -Al.
if you want only the last four files that are modified in a directory then the following command will help.
satyendra $ ls -Alt | head -4
total 7668
-rw-r--r-- 1 satyendra Administrators 2359296 Sep 21 21:20 ntuser.dat
-rw-r--r-- 1 satyendra Administrators 262144 Sep 21 21:20 ntuser.dat.LOG1
dr-xr-xr-x 0 satyendra Administrators 98304 Sep 21 20:57 Recent
The –t option shows files by the time they are modified.
head -4 takes the input from ls -Alt and shows only the last 3 modified files.
Wednesday, September 14, 2011
Agile Scrum dictionary
What is Agile Methodology
Agile software
methodology (Develop quickly and lightly) is based on iterative and incremental development
methodology.ideally
each iteration(Also known as Sprint in Agile terms)is spanned for 2weeks.
during these two weeks a
potentially shippable product (also known as increment) is implemented.
What is Scrum
Scrum is a
light-weight Agile method mainly used for managing
software development.
scrum
perfectly suits for completing complex projects,yet scrum methods are simple to
implement on daily basis.
Sprint
Sprint is an iteration
of work during which a potentially shippable product increment is worked upon
and produced. Currently, the recommended sprint duration is 2-weeks.
Daily Scrum
A short daily meeting
(ideally 15 minutes)where each team member stands and answers 3 questions:
1. What have I done (yesterday )for the sprint since the last Scrum meeting?
2. What will I do (today) for the sprint before the next Scrum meeting?
3. Impediments (work blocking issues)faced by each individual while performing work for the sprint.
1. What have I done (yesterday )for the sprint since the last Scrum meeting?
2. What will I do (today) for the sprint before the next Scrum meeting?
3. Impediments (work blocking issues)faced by each individual while performing work for the sprint.
Subscribe to:
Posts (Atom)