0
votes

i try to link mysql-connector 1.1.3 in Netbeans (7.3, Windows 7) with Mingw-Compiler to my c++ Project. In the project properties i have add all mysql-connector directories (include, lib, cppcon) under "included Directorys" and under Linker "Additionell Linker Directorys". I added the boost libs to. But in the Compiler Output say always:

fatal error: mysql_connection.h: No such file or directory

Sorry for my poor english and thanks for help...

the complete output:

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf make[1]: Entering directory /cygdrive/c/Users/Toni/Desktop/dev/Wiesel/new/tests/sql_test2' "/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/sql_test2.exe make[2]: Entering directory/cygdrive/c/Users/Toni/Desktop/dev/Wiesel/new/tests/sql_test2' mkdir -p build/Debug/MinGW-Windows rm -f build/Debug/MinGW-Windows/main.o.d g++ -c -g -I/D/libs/mysql-connector-c++-noinstall-1.1.3-win32 -I/D/libs/mysql-connector-c++-noinstall-1.1.3-win32/include -I/D/libs/mysql-connector-c++-noinstall-1.1.3-win32/include/cppconn -I/D/libs/mysql-connector-c++-noinstall-1.1.3-win32/lib -I/D/libs/boost_1_53_0 -I/D/libs/boost_1_53_0/boost -I/D/libs/boost_1_53_0/libs -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp main.cpp:9:30: fatal error: mysql_connection.h: No such file or directory compilation terminated. nbproject/Makefile-Debug.mk:66: recipe for target build/Debug/MinGW-Windows/main.o' failed make[2]: [build/Debug/MinGW-Windows/main.o] Error 1 (ignored) mkdir -p dist/Debug/MinGW-Windows g++ -o dist/Debug/MinGW-Windows/sql_test2 build/Debug/MinGW-Windows/main.o -L/D/libs/boost_1_53_0/boost -L/D/libs/boost_1_53_0/libs -L/D/libs/mysql-connector-c++-noinstall-1.1.3-win32 -L/D/libs/mysql-connector-c++-noinstall-1.1.3-win32/include -L/D/libs/mysql-connector-c++-noinstall-1.1.3-win32/include/cppconn -L/D/libs/mysql-connector-c++-noinstall-1.1.3-win32/lib -lmysqlcppconn -lmysqlcppconn-static -lmysqlcppconn -static g++.exe: error: build/Debug/MinGW-Windows/main.o: No such file or directory nbproject/Makefile-Debug.mk:62: recipe for targetdist/Debug/MinGW-Windows/sql_test2.exe' failed make[2]: [dist/Debug/MinGW-Windows/sql_test2.exe] Error 1 (ignored) make[2]: Leaving directory /cygdrive/c/Users/Toni/Desktop/dev/Wiesel/new/tests/sql_test2' make[1]: Leaving directory/cygdrive/c/Users/Toni/Desktop/dev/Wiesel/new/tests/sql_test2'

1
Code please? We can't help without it.It'sNotALie.

1 Answers

0
votes

This should be what you're looking for:

A library would normally reside in its own installation directory so you would need to point NB to where that is. If you right-click the project name in the "Projects" window, you'll have a Properties option.

  1. Select the Build/C++ compiler option to add the directory for the .h files.
  2. Select the Build/Linker to add the directory for the dll file.

Include C++ library in Netbeans 7.0