How to use c++ header files in qt creator?

0 Timmy Cafe · May 14, 2015
Hello, so i am using qt to make an application and i was needing to be able to get the current date and time from the system, I was going to use #include <ctime>, but qt cannot find this file. How can i make it so qt creator can also use the standard c++ library?

Post a Reply


Oldest  Newest  Rating
0 Michael Bradford · May 19, 2015
Two things to try, 

1. In Qt try to make sure you're not using MingGW as a compiler some other people have had problems with that (It's not the compiler Gcc is the compiler). 

2. In your .pro file try adding "INCLUDEPATH += /usr/include/c++/4.3" this should tell Qt where to find the std c++ libs. 
0 Michael Bradford · May 19, 2015
Also sengngy kouch, Qt creator is an idea specialized for making Qt GUI applications and as such Visual Studio probably wont support there format. (Something tells me Microsoft is only going to support thier C# and .net type GUI stuff in terms of visual .ui designer files) I could be wrong though. 

But if your using Qt I would recommend Qt Creator because it's far more lightweight than MSVS and is geared and built specifically for Qt.
0 Michael Bradford · May 19, 2015
Sorry that should read "Qt Creator is an IDE specialized for.. " my bad.
0 Sengngy Kouch · May 15, 2015
Hi there, 

I wonder if you are using Windows, why not trying out Visual Studio by Microsoft. It is free and work well.
  • 1



Used in many types of software including music players, video games, and many large scale applications.

Bucky Roberts Administrator