User forums > General (but related to Code::Blocks)
Adding Librabry/header
LordCB:
Hello friends,
I have a problem in adding some header files to my project with CB.
I try to add SQLAPI++. I give the pathes under Project->Builoptions->Projectname->Searchdirectories.
But during compiling it does not find the header. What´s wrong.
I use Windows XP. And MinGw. Thx in advance
LordCB:
When I add some directories in search path, it seems that CB don´t take the directories to the makefile.debug file now in my case as arguments to the compiler like -I"<PathToHeader>"
The Pathes are in my cb projectfile like this
--- Code: ---<Compiler>
<Add option="-Wall" />
<Add option="-g" />
<Add directory="C:\Qt\4.4.1\include" />
<Add directory="C:\Qt\4.4.1\include\QtGui" />
<Add directory="C:\Qt\4.4.1\include\QtSql" />
<Add directory="C:\Qt\4.4.1\include\QtCore" />
<Add directory="C:\Qt\4.4.1\include\QtDesigner" />
<Add directory="C:\Qt\4.4.1\include\QtNetwork" />
<Add directory="C:\Qt\4.4.1\include\QtOpenGL" />
<Add directory="C:\Qt\4.4.1\include\QtXml" />
<Add directory="C:\SqlApi\include" />
<Add directory="C:\SqlApi\include\odbc_win32" />
<Add directory="C:\SqlApi\include\ss_win32" />
<Add directory="C:\Testheader" />
</Compiler>
<Linker>
<Add library="QtCore4" />
<Add library="QtGui4" />
<Add library="QtSql4" />
<Add library="QtSvg4" />
<Add library="QtXml4" />
<Add library="libsqlapi" />
<Add directory="C:\Qt\4.4.1\lib" />
<Add directory="C:\Qt\4.4.1\bin" />
<Add directory="C:\SqlApi\bin" />
<Add directory="C:\SqlApi\lib" />
</Linker>
--- End code ---
What´s wrong here
stahta01:
--- Quote from: LordCB on August 28, 2008, 12:02:09 pm ---When I add some directories in search path, it seems that CB don´t take the directories to the makefile.debug file now in my case as arguments to the compiler like -I"<PathToHeader>"
--- End quote ---
I have no idea what you mean by makefile.debug never heard of it in relation to C::Bs.
Did you turn on full command line mode?
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Tim S
LordCB:
Ok, sorry now in slow motion ;o)).
Ok I use the Qt Library (4.4.1). Thatswhy I have make the script/tool or what ever with the the name QMake which runs qmake in the projectdir. After this process it generate a makefile(custom makefile) and a makefile.debug and makefile.release.
after all I have to add my lib(SQLAPI++) my pro file looks like this
--- Code: ---TEMPLATE = app
TARGET =
DESTDIR = bin/
DEPENDPATH += . HEADERS SOURCES
INCLUDEPATH += .
QT += network xml svg sql
HEADERS += HEADERS/window.h \
HEADERS/ConDB.h
SOURCES += SOURCES/window.cpp \
SOURCES/main.cpp
RESOURCES += TraDa.qrc
CONFIG += debug
win32:LIBS += C:/SqlApi/lib/libsqlapidll.a
RC_FILE += RESOURCESFILES/TraDa.rc
--- End code ---
and when I add the directories of the header in Project->Buildoptions
LordCB:
Soorry,
and when I add the directories of the header in Project->Buildoptions ->searchdirectories I add my header path
but during the Compile process it says no such file or directories.
So when I look in the generated makefile.debug the header pathes like -I"<pathtoheader>" aren´t in this file?????
I think it must be also declared in the pro file isn´t it????
Navigation
[0] Message Index
[#] Next page
Go to full version