include file not found

Norbert Zawodsky norbert at zawodsky.at
Mon Apr 9 20:06:11 UTC 2012


Am 09.04.2012 15:02, schrieb Milian Wolff:
> 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
Hey Milian,

thanks for the hints regarding cmake. My tiny app is already running and 
happily displaying DB-records ...

Norbert





More information about the KDevelop mailing list