Author Topic: Adding Librabry/header  (Read 5383 times)

Offline LordCB

  • Multiple posting newcomer
  • *
  • Posts: 79
Adding Librabry/header
« 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

Offline LordCB

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: Adding Librabry/header
« Reply #1 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: [Select]
<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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6546
    • My Best Post
Re: Adding Librabry/header
« Reply #2 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
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline LordCB

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: Adding Librabry/header
« Reply #3 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: [Select]
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

Offline LordCB

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: Adding Librabry/header
« Reply #4 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????

Offline LordCB

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: Adding Librabry/header
« Reply #5 on: August 29, 2008, 09:48:21 am »
And yes I did turn on the full command line mode!

Offline LordCB

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: Adding Librabry/header
« Reply #6 on: August 29, 2008, 10:19:06 am »
Adding
Code: [Select]
INCLUDEPATH = C:/SqlApi/include C:/SqlApi/include/odbc_win32 C:/SqlApi/include/ss_win32
in the pro file solve the problem thx a lot