Qt Libs error



  • I am using Qt sdk in Ubuntu X64 and when I build the projetc I reicive this errors:
    "error: LIBS: No such file or directory"
    "error: +=: No such file or directory"

    the .pro code:
    #-------------------------------------------------

    Project created by QtCreator 2012-03-20T20:49:31

    #-------------------------------------------------

    QT += core gui
    network

    TARGET = Collector
    TEMPLATE = app

    SOURCES += main.cpp
    collector.cpp

    HEADERS += collector.h

    FORMS += collector.ui

    INCLUDEPATH = ../qjson/include\

    LIBS += -L../usr/bin -lqjson
    LIBS += -L../usr/bin -luuid
    LIBS += -L../etc/likewise-open -ladvapi32
    LIBS += -L../usr/bin -lsetupapi\

    include(../qserialdevice/src/qserialdevice/qserialdevice.pri)
    include(../qserialdevice/src/qserialdeviceenumerator/qserialdeviceenumerator.pri)



  • I am confused.

    1. I don't know from where you get this .pro file, But it obviously can not be used under Ubuntu.

    2. I can't figure out how the .pro is used by yourself. Though the file is wrong, but it can not generate errors such as

    bq. error: LIBS: No such file or directory



  • 1+1=2, why you say the file is wrong at all?
    My comments:
    @
    INCLUDEPATH = ../qjson/include
    @
    do not use '' at the end when not breaking the line

    same for the LIBS,
    also not sure about that "..". I can't verify it right now but if I remember it should be:
    @
    LIBS += -L/usr/bin -lqjson
    LIBS += -L/usr/bin -luuid
    LIBS += -L/etc/likewise-open -ladvapi32
    LIBS += -L/usr/bin -lsetupapi
    @



  • ;-) libraries such as advapi32.lib setupapi.lib or libadvapi32.a libsetupapi.a are all Windows special.



  • oh, sorry :) I was focused only on the .pro syntax, not even looked on the lib names :)



  • do not use '' at the end when not breaking the line

    If I don't use the '' the Qt show me error ("library ...lqjson not found").



  • mitchelhajime, no mater you do, you won't compile this project on ubuntu. Also it seems you just don't have the qjson lib.



  • [quote author="gmaro" date="1333667746"]mitchelhajime, no mater you do, you won't compile this project on ubuntu. Also it seems you just don't have the qjson lib.[/quote]

    :/ I installed qjson with ubuntu's repository... Is better I download the library and compile in terminal or Qt?



  • [quote author="mitchelhajime" date="1333668065"]
    :/ I installed qjson with ubuntu's repository... Is better I download the library and compile in terminal or Qt?[/quote]

    That's fine, you just need to check where it is and pass the correct path.

    But still, I think you've missed this:
    [quote author="1+1=2" date="1333667188"];-) libraries such as advapi32.lib setupapi.lib or libadvapi32.a libsetupapi.a are all Windows special.[/quote]



  • But still, I think you've missed this:
    [quote author="1+1=2" date="1333667188"];-) libraries such as advapi32.lib setupapi.lib or libadvapi32.a libsetupapi.a are all Windows special.[/quote]

    [/quote]

    Ah.. this library's I found for linux too.. one is in the mingw32 for linux



  • [quote author="mitchelhajime" date="1333668523"]

    Ah.. this library's I found for linux too.. one is in the mingw32 for linux[/quote]

    If you really want to cross-compile the project, you should compile the Qt using the cross-compiler first. All of course, you will come with many many problems, but once done, you will be a Specialist in Qt area.

    However, I don't know: what is the project for? why you want to compile a windows project under linux? ....



  • [quote author="1+1=2" date="1333669466"]
    [quote author="mitchelhajime" date="1333668523"]

    Ah.. this library's I found for linux too.. one is in the mingw32 for linux[/quote]

    If you really want to cross-compile the project, you should compile the Qt using the cross-compiler first. All of course, you will come with many many problems, but once done, you will be a Specialist in Qt area.

    However, I don't know: what is the project for? why you want to compile a windows project under linux? ....[/quote]

    It is a program that talks to a hardware to get and send data with interface (for the customers).
    I need to make this run in linux and windows. :/

    Thanks for help I go to read about Cross-Compiling now :)



  • ;(

    You are on the wrong way now, you should know that, the result of cross-compiling is a windows application. After successfully(If you really can do this) compiled, you will need a windows system to run it!

    If all you use is a serial port, it will be very easy.

    Forget this .pro file, write a right one.



  • [quote author="1+1=2" date="1333670506"];(

    You are on the wrong way now, you should know that, the result of cross-compiling is a windows application. After successfully(If you really can do this) compiled, you will need a windows system to run it!

    If all you use is a serial port, it will be very easy.

    Forget this .pro file, write a right one.[/quote]

    I agree it's pretty easy to make a program that configures the hardware and send (for one website) and receive data (for sensors) , but I need to do with with graphical interface and linux for end user.



  • What I mean is, write a cross-platform serialport application with GUI is rather easy too.

    But you have make an easy problem become complexed, as you get a platform special project file, and you want to compile it under another platform.

    Cross-platform examples can be found from google too. such as

    http://docs.qextserialport.googlecode.com/hg/1.2/examples-uartassistant.html



  • [quote author="1+1=2" date="1333671273"]What I mean is, write a cross-platform serialport application with GUI is rather easy too.

    But you have make an easy problem become complexed, as you get a platform special project file, and you want to compile it under another platform.

    Cross-platform examples can be found from google too. such as

    http://docs.qextserialport.googlecode.com/hg/1.2/examples-uartassistant.html[/quote]

    Thanks after I used part of this lib's example for made the project but I had to add a timer and a customizable filter for the output data.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.