PDA

View Full Version : Question about mix Qt with other C++ codes



hnfmr
5th November 2010, 04:48
Dear all,

I am still new to Qt, now I have a silly question to ask everybody.

I'm currently coding using mainly Boost library, however, I want to add a GUI interface for my program in the near future. I'm using data structures such as Boost.Circular Buffer, STL vector, and etc...

My questions are:
Can I compile plain C++ codes mixed with Qt codes, using e.g. GCC? In other words, can I mix these codes together? What steps should I take when writing such a program?

Your advice will be highly appreciated. Thanks in advance for helping a newbie like me!

tbscope
5th November 2010, 05:22
In general, there's no problem mixing several libraries.

However, keep in mind that library A might define a symbol that library B defines too. That will not work. I think an example of this is that Boost also defines signals and slots. I think in this case you need to use CONFIG += no_keywords in your .pro file.