User forums > Help

problem with mysql headers

<< < (2/2)

BlueHazzard:
please make a rebuild (Build->Rebuild)
and post the full build log (tab Build Log)

BlueHazzard:

--- Quote from: dali1985 on May 15, 2013, 02:09:55 pm --- I have this build log but I have always the same result 'Hello World' whatever I change in the text

--- End quote ---

have you done a rebuild?
Build->Rebuild or
Build->Clean and Build->Build and run

dali1985:
Ok. Lets explain step by step.

First I created a simple project called test10. I built and ran it and I have the hello world.
Next step
Project->Build Options ->Search directories-> /usr/include/mysql
Project -> Build Options -> Compiler Settings tab -> Other Options and enter `mysql_config --cflags`
Project -> Build Options -> Linker Settings tab -> Other Options and enter `mysql_config --libs`

I added the mysql.h and now my program is

--- Code: ---#include <iostream>
#include <mysql.h>
using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}

--- End code ---

Next
build-> clean
build-> build and run

'It seems that this project have not been built yet.Do you want to built it now?' I clicked Yes.

I have the following in the build log

--- Code: ----------------- Build: Debug in test10 ---------------

Compiling: main.cpp
g++: fatal error: no input files
compilation terminated.
Process terminated with status 4 (0 minutes, 4 seconds)
0 errors, 0 warnings

--- End code ---

oBFusCATed:

--- Quote from: dali1985 on May 15, 2013, 02:47:17 pm ---Project->Build Options ->Search directories-> /usr/include/mysql

--- End quote ---
This isn't required.

It seems you've not enabled full logging.

BlueHazzard:
Somehow your project is messed up...

It seems that you are working with a old version of c::b...
please enable the full compiler logging: this is done by selecting the "Full command line" option Under menu "Settings" -> "Compiler" -> Global compiler settings -> [the compiler you use] -> "Other Setting" tab, "Compiler logging"
make a rebuild and post the full log again...

this thread could have the half length if you would follow the instructions under the link i posted 6 answers prior :

--- Quote from: BlueHazzard on May 15, 2013, 01:44:43 pm ---http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

--- End quote ---
till now i don't know your os, your c::b version etc...

Navigation

[0] Message Index

[*] Previous page

Go to full version