please help

Help
Md Hossain
2010-06-30
2013-05-09
  • Md Hossain
    Md Hossain
    2010-06-30

    Hi all

    I know i should not discuss my current problem here. I tried to get help from other forum but failed and terribly struck here. if you can please give a reply.

    ''''''''' I just moved .cpp and .h files(not main) into src/Image folder and tried to include into libivt.a.  my make into src is
    robot@robot:~/Music/IVT/src$ make
    g++ -O3 -I.  -c Image/ObjectFinderOrganizer.cpp -o build/object_finder_organizer.o
    '
    '
    '
    '

    Math/SVD.cpp: In function ‘void<unnamed>::icvSVD_64f(double*, int, int, int, double*, double*, int, int, double*, int, double*)’:
    Math/SVD.cpp:566: warning: format ‘%.2f’ expects type ‘double’, but argument 2 has type ‘int’
    Math/SVD.cpp: In function ‘void<unnamed>::icvSVD_32f(float*, int, int, int, float*, float*, int, int, float*, int, float*)’:
    Math/SVD.cpp:968: warning: format ‘%.2f’ expects type ‘double’, but argument 2 has type ‘int’
    g++ -O3 -I. -c DataProcessing/Normalizer.cpp -o build/normalizer.o
    trinsic_parameter_calculator.o
    '
    '
    '

    g++ -O3 -I. -c Image/CornerSubpixel.cpp -o build/corner_subpixel.o
    ar -rc ../lib/linux/libivt.a build/object_finder_organizer.o build/math_2d.o build/math_3d.o build/matd.o build/vecd.o build/byte_image.o build/short_image.o build/int_image.o build/float_matrix.o build/float_vector.o build/double_matrix.o build/double_vector.o build/image_processor.o build/stereo_vision.o build/rgb_color_model.o build/color_parameter_set.o build/color_segmentation_optimizer.o build/helpers.o build/quicksort.o build/basicfileio.o build/configuration.o build/dlt_calibration.o build/calibration.o build/stereo_calibration.o build/video_reader.o build/uncompressed_avi_capture.o build/bitmap_capture.o build/bitmap_sequence_capture.o build/posix_thread.o build/particle_filter_framework.o build/particle_filter_framework_float.o build/linear_algebra.o build/svd.o build/normalizer.o build/primitives_drawer.o build/event.o build/mutex.o build/threading.o build/mean_filter.o build/ransac.o build/stereo_matcher.o build/histogram_color_segmenter.o build/dynamic_array.o build/kdtree.o build/icp.o build/object_finder.o build/object_finder_stereo.o build/object_color_segmenter.o build/compact_region_filter.o build/patch_feature_entry.o build/sift_feature_calculator.o build/harris_sift_feature_calculator.o build/object_pose.o build/posit.o build/rapid.o build/tracker_2d3d.o build/rectification.o build/undistortion.o build/image_mapper.o build/performance_lib.o build/nearest_neighbor.o build/klt_tracker.o build/extrinsic_parameter_calculator.o build/corner_subpixel.o
    ranlib ../lib/linux/libivt.a
    g++ -O3  -pthread -D_REENTRANT    -DUSE_GTKGUI -I /home/robot/Music/IVT/src -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12   -I. -c gui/GUIFactory.cpp -o build/gui_factory.o
    g++ -O3  -DUSE_GTKGUI -I /home/robot/Music/IVT/src -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12   -I. -c gui/GTK/GTKApplicationHandler.cpp -o build/gtk_application_handler.o
    g++ -O3  -DUSE_GTKGUI -I /home/robot/Music/IVT/src -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12   -I. -c gui/GTK/GTKMainWindow.cpp -o build/gtk_main_window.o
    g++ -O3  -DUSE_GTKGUI -I /home/robot/Music/IVT/src -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12   -I. -c gui/GTK/GTKMainWindowWidget.cpp -o build/gtk_main_window_widget.o
    ar -rc ../lib/linux/libivtgui.a  build/gui_factory.o build/gtk_application_handler.o build/gtk_main_window.o build/gtk_main_window_widget.o
    ranlib ../lib/linux/libivtgui.a

    and make output of main program for HSVColorSegmentationAPP is

    robot@robot:~/Music/test$ make
    g++ -O3 -I /home/robot/Music/IVT/src -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12   -Isrc -c main.cpp -o main.o
    g++ -O3 main.o    -L /home/robot/Music/IVT/lib/linux -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0   -livtgui -livt  -o hsvcolorsegmentationapp
    /home/robot/Music/IVT/lib/linux/libivt.a(object_finder_organizer.o): In function `CObjectFinderOrganizer::RightFileBrowseButtonClicked()':
    ObjectFinderOrganizer.cpp:(.text+0xb6c): undefined reference to `FileDialog(bool, char const**, int, char const*, char*, int)'
    /home/robot/Music/IVT/lib/linux/libivt.a(object_finder_organizer.o): In function `CObjectFinderOrganizer::LeftFileBrowseButtonClicked()':
    ObjectFinderOrganizer.cpp:(.text+0xc2c): undefined reference to `FileDialog(bool, char const**, int, char const*, char*, int)'
    /home/robot/Music/IVT/lib/linux/libivt.a(object_finder_organizer.o): In function `CObjectFinderOrganizer::ColorParameterFileBrowseButtonClicked()':
    ObjectFinderOrganizer.cpp:(.text+0xcd8): undefined reference to `FileDialog(bool, char const**, int, char const*, char*, int)'
    /home/robot/Music/IVT/lib/linux/libivt.a(object_finder_organizer.o): In function `CObjectFinderOrganizer::LoadCameraParameterFileButtonClicked()':
    ObjectFinderOrganizer.cpp:(.text+0xd88): undefined reference to `FileDialog(bool, char const**, int, char const*, char*, int)'
    /home/robot/Music/IVT/lib/linux/libivt.a(object_finder_organizer.o): In function `CObjectFinderOrganizer::Run(int, char**)':
    ObjectFinderOrganizer.cpp:(.text+0x1846): undefined reference to `CreateApplicationHandler(int, char**)'
    ObjectFinderOrganizer.cpp:(.text+0x1882): undefined reference to `CreateMainWindow(int, int, int, int, char const*)'
    collect2: ld returned 1 exit status
    make: ***  Error 1

    I really do appreciate any response of yours.

    thanks in advance
    hossain

     
  • Pedram Azad
    Pedram Azad
    2010-07-01

    Hi Hossain,

    I do not completely understand what you copied where, and what you tried to include in libivt.a.

    Did HSVColorSegmentation run, before you started to move files etc.? If not, what operating system do you use?

    Could you send me an e-mail with the files Makefile and Makefile.base attached to it?

    Pedram

     
  • Pedram Azad
    Pedram Azad
    2010-07-02

    Hi Hossain,

    the problem is due to dependencies between static libraries: libivtgui.a depends on libivt.a. You added a file to be compiled into libivt.a, which actually depends on libivtgui.a (because it uses GUI related files). This way, not only libivtgui.a depends on libivt.a, but also libivt.a depends on libivtgui.a, which caused the problem. Simply adding your file to be compiled into libivtgui.a instead of into libivt.a will fix the problem.

    Pedram

     
  • Md Hossain
    Md Hossain
    2010-07-02

    Never used like this forum…..It's awesome
    thank you very much Dr Azad

    Hossain