PDA

View Full Version : How do I add a qt source code library to my project ?



Paulo Fernando Pimenta
13th January 2011, 04:40
Hello everyone (first post),

I would like to know how to configure my qt enviromment (in windows) to use a c++ source code library for qt. I would like to use the qtLua library (http://www.nongnu.org/libqtlua/) rather then QtScript. It is a library for qt that exposes Qt objects, making them "scriptable" in Lua. The library is available only in source code. My question is : Is there a way do just add the source code into my qt project, or should i compile qtLua first ? I'm using windows 7, Visual Studio 2005 with qt. All my g++, gcc, nmake e qmake seems to work perfectly. Thanks in advance for any help.

Regards,

Paulo

high_flyer
13th January 2011, 08:43
Is there a way do just add the source code into my qt project, or should i compile qtLua first ?
Sure you can just add the qtLua to your project as source.
The question is why would you want to do that?

or should i compile qtLua first ?
This is definitively the way to go.

Paulo Fernando Pimenta
14th January 2011, 16:40
Thanks for your help. However, just adding the source code to the project wouldn't not make it "runnable" anyway ? I mean, if it's a c++ library fo qt, reading the source code wouldnt make the job ?

Regards,

high_flyer
14th January 2011, 16:43
Huh?

Can you explain what do you mean?
I understand the words, but they way you put them together makes no sense to me...

"Runnable" is code that was compiled to binary. (VERY simply put, in the sense I think you might be talking)

Paulo Fernando Pimenta
14th January 2011, 19:43
Sorry for not being clear. I'll try to explain better. My goal is to make a IDE for a script program that i deveveloped in lua programing language. For that, i want to use qtLua lib in order to "expose" the qt objetcs making them scriptable (at least, thats what it says in the site project). My question is : if i create, for example, a qt configuration dialog example through the wizard in qtcreator, could i use just include the qtLua source code then start to use it already, or do i have to compile it first ? If i compile it, how can i add it to my project ? I understand that for using qtLua, the qtlua source code must be included into my project. Or maybe not ? Perhaps i'm not getting how external libraries can be added and used in qt framework....:o

Again, thanks for your answer, and i hope to have writen in a more compreensive way this time..:)

high_flyer
14th January 2011, 22:33
Your questions show that you didn't built projects in C++ before, and surly didn't work with or built libs.
This is not something you can just pick up form a forum post, and this forum is about helping with Qt specific issues not general programming or basic about programming.
You are welcome to post questions about specific Qt issues,but how to link in general, or how to build libs is beyond the scope of this forum.

Good luck!