Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: LordCB on August 28, 2008, 09:35:30 am

Title: Adding Librabry/header
Post by: LordCB on August 28, 2008, 09:35:30 am
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
Title: Re: Adding Librabry/header
Post by: 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>"


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>

What´s wrong here
Title: Re: Adding Librabry/header
Post by: stahta01 on August 28, 2008, 06:05:16 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>"

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
Title: Re: Adding Librabry/header
Post by: LordCB on August 29, 2008, 09:40:50 am
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

and when I add the directories of the header in Project->Buildoptions
Title: Re: Adding Librabry/header
Post by: LordCB on August 29, 2008, 09:46:14 am
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????
Title: Re: Adding Librabry/header
Post by: LordCB on August 29, 2008, 09:48:21 am
And yes I did turn on the full command line mode!
Title: Re: Adding Librabry/header
Post by: LordCB on August 29, 2008, 10:19:06 am
Adding
Code
INCLUDEPATH = C:/SqlApi/include C:/SqlApi/include/odbc_win32 C:/SqlApi/include/ss_win32

in the pro file solve the problem thx a lot