Results 1 to 2 of 2

Thread: Make Qt4.8.1 on Linux, generate dynamic library error!

  1. #1
    Join Date
    May 2012
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Make Qt4.8.1 on Linux, generate dynamic library error!

    Hi, everyone,

    I try to compile QT 4.8.1 on Linux for Ti AM335x platform, but when run "make" try to link and generate dymic library, it report "init.c.text+0x34): undefined reference to `main'" error.

    I check and found this problem is caused by handling the library as application, the make try to find _main() function, so report error. There is no "-shared" option in linker setting so cause this problem.

    Following is my configuration:
    ./configure -v -prefix /opt/qt-4.8.1 -fast -platform qws/linux-x86-g++ -xplatform qws/linux-am335x-g++ -embedded arm -webkit -no-mmx -no-3dnow -no-glib -no-cups -no-largefile -dbus -shared

    and my qmake.conf:

    #include(../../common/g++.conf)
    include(../../common/linux.conf)
    include(../../common/qws.conf)

    # modifications to g++.conf
    QMAKE_CC = /home/sword/ti-sdk-am335x-evm-05.04.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-gcc
    QMAKE_CXX = /home/sword/ti-sdk-am335x-evm-05.04.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-g++
    QMAKE_LINK = /home/sword/ti-sdk-am335x-evm-05.04.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-g++
    QMAKE_LINK_SHLIB = /home/sword/ti-sdk-am335x-evm-05.04.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-g++
    #QMAKE_CFLAGS_RELEASE = -O3 -march=armv5te
    #QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv5te
    QMAKE_CFLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -I/home/sword/ti-dvsdk_omapl138-evm_04_03_00_06/linux-devkit/arm-arago-linux-gnueabi/usr/include/dbus-1.0/ -I/home/sword/ti-dvsdk_omapl138-evm_04_03_00_06/linux-devkit/arm-arago-linux-gnueabi/usr/lib/dbus-1.0/include
    QMAKE_CXXFLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -I/home/sword/ti-dvsdk_omapl138-evm_04_03_00_06/linux-devkit/arm-arago-linux-gnueabi/usr/include/dbus-1.0/ -I/home/sword/ti-dvsdk_omapl138-evm_04_03_00_06/linux-devkit/arm-arago-linux-gnueabi/usr/lib/dbus-1.0/include

    # modifications to linux.conf
    QMAKE_AR = /home/sword/ti-sdk-am335x-evm-05.04.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY = /home/sword/ti-sdk-am335x-evm-05.04.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-objcopy
    QMAKE_STRIP = /home/sword/ti-sdk-am335x-evm-05.04.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-strip

    QMAKE_LIBS = -lts -lz -L/data/arago/usr/lib -ldbus-1
    load(qt_config)

    #-I/home/sword/ti-dvsdk_omapl138-evm_04_03_00_06/linux-devkit/arm-arago-linux-gnueabi/usr/include/dbus-1.0/ -I/home/sword/ti-dvsdk_omapl138-evm_04_03_00_06/linux-devkit/arm-arago-linux-gnueabi/usr/lib/dbus-1.0/include


    Is there any problem on it?

    Can anybody help me?

    Thanks!

  2. #2
    Join Date
    May 2012
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Make Qt4.8.1 on Linux, generate dynamic library error!

    Sorry for distorbing you, I solved this problem.

    For avoiding warning, I get rid of the include code in my qmake.conf:

    #include(../../common/g++.conf)

    this will cause that problem.

    Regards

Similar Threads

  1. Dynamic vs. static in Linux (DLL analogs in Linux)
    By timmu in forum Installation and Deployment
    Replies: 5
    Last Post: 23rd January 2012, 14:26
  2. Replies: 1
    Last Post: 18th October 2011, 17:53
  3. How to generate dynamic object
    By tuxit in forum Qt Quick
    Replies: 0
    Last Post: 17th August 2011, 13:49
  4. Dynamic library on Mac, Library not loaded
    By grayfox in forum Newbie
    Replies: 2
    Last Post: 2nd July 2011, 02:42
  5. make--dosn't generate an .exe file
    By Nora in forum Installation and Deployment
    Replies: 11
    Last Post: 12th November 2007, 01:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.