include file not found

Milian Wolff mail at milianw.de
Mon Apr 9 13:02:30 UTC 2012


On Monday 09 April 2012 13:40:50 Norbert Zawodsky wrote:
> Hello everybody!
> 
> I am subscribed to this list für quite some time now, but this is first
> post. Although I've got some C++ experience (20 years ago, I was a C++
> programmer for a very big, well known company), I'm completely new to
> kdevelop and KDE-programming. Now I'd like to do some prgramming aggain,
> just for fun in my spare time.
> 
> For a start I installed kdevelop 4.3 and let it generate that little
> Hello world sample. The first thing I'd like to try is a connection to a
> mySQL Database, read a record and display it.
> 
> The package "mysql-C++-connector" is installed and known by kdevelop
> since "#include <mysql-connector/mysql_driver.h>" is autocompleted.
> 
> Now, what I do not understand is, while
> 
> /usr/include/mysql-connector/mysql_driver.h
> 
> is found by the compiler, it does NOT find
> 
> /usr/include/mysql-connector/cppconn/driver.h
> 
> mysql_driver.h contains #include <cppconn/driver.h>
> The exact compile error is
> 
> In file included from /ProgDev/test3/test3/main.cpp:3:0:
> /usr/include/mysql-connector/mysql_driver.h:30:28: fatal error:
> cppconn/driver.h: No such file or directory
> 
> And I noticed that kdevelop behaves the same. While kdevelop finds
> mysql-connector/mysql_driver.h, it doesn't find
> mysql-connector/cppconn/driver.h too.

Hey there,

please note that KDevelops semantic analysis of your code is not related to 
the underlying build toolchain. Compiler errors result from an insufficiently 
or improperly configured toolchain. If you used the hello world template you 
most definitely use CMake, have you added the required lines there to find 
mysql-connector & cppconn? Please search the web on how to do this and read 
the cmake tutorial.

Cheers
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20120409/10f21214/attachment.sig>


More information about the KDevelop mailing list