Qt Libs error
-
wrote on 5 Apr 2012, 20:42 last edited by
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
networkTARGET = Collector
TEMPLATE = appSOURCES += main.cpp
collector.cppHEADERS += 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) -
wrote on 5 Apr 2012, 21:01 last edited by
I am confused.
-
I don't know from where you get this .pro file, But it obviously can not be used under Ubuntu.
-
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
-
-
wrote on 5 Apr 2012, 22:48 last edited by
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 linesame 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
@ -
wrote on 5 Apr 2012, 23:06 last edited by
;-) libraries such as advapi32.lib setupapi.lib or libadvapi32.a libsetupapi.a are all Windows special.
-
wrote on 5 Apr 2012, 23:09 last edited by
oh, sorry :) I was focused only on the .pro syntax, not even looked on the lib names :)
-
wrote on 5 Apr 2012, 23:13 last edited by
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").
-
wrote on 5 Apr 2012, 23:15 last edited by
mitchelhajime, no mater you do, you won't compile this project on ubuntu. Also it seems you just don't have the qjson lib.
-
wrote on 5 Apr 2012, 23:21 last edited by
[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?
-
wrote on 5 Apr 2012, 23:25 last edited by
[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] -
wrote on 5 Apr 2012, 23:28 last edited by
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
-
wrote on 5 Apr 2012, 23:44 last edited by
[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? ....
-
wrote on 5 Apr 2012, 23:51 last edited by
[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 :)
-
wrote on 6 Apr 2012, 00:01 last edited by
;(
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.
-
wrote on 6 Apr 2012, 00:07 last edited by
[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.
-
wrote on 6 Apr 2012, 00:14 last edited by
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
-
wrote on 9 Apr 2012, 13:41 last edited by
[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.
1/16