Ankit Aggarwal wrote:
> I want to use database for one of my project instead of Flat Files. But, I
> am facing some problem connecting C Program to Database. I tried and
> searched for problem for almost 4 hours now.
> 
> *Configuration :*
> 
>    - I am using *Windows XP* as OS
>    - *Dev -C++* as Compiler (it uses gcc in backend I guess)
>    - *MySQL* Database
>    - *ODBC* is set-up and running properly
> 
> 
> *The Problem :*
> I am unable to tell the Linker where the ODBC library file is (this is what
> I can get from searches). Here is the *Error Log* :
> 
> Compiler: Default compiler
> Executing  g++.exe...
> g++.exe "E:\db_conn.cpp" -o "E:\db_conn.exe"   -g3
> -I"C:\Dev-Cpp\include\c++"  -I"C:\Dev-Cpp\include\c++\mingw32"
> -I"C:\Dev-Cpp\include\c++\backward"  -I"C:\Dev-Cpp\include"
> -L"C:\Dev-Cpp\lib"
> C:\DOCUME~1\ME62CF~1\LOCALS~1\Temp/ccgtaaaa.o(.text+0x12f): In function
> `main':
> E:/db_conn.cpp:32: undefined reference to `sqlalloc...@4'
> C:\DOCUME~1\ME62CF~1\LOCALS~1\Temp/ccgtaaaa.o(.text+0x141):E:/db_conn.cpp:35:
> undefined reference to `sqlallocconn...@8'

On second thought, this is Dev-C++.  It probably has odbc32.lib 
somewhere already.  The one with the Windows SDK is designed for VC++.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to