Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Compiling OLEDB using MINGW
Compiling OLEDB using MINGW [message #4101] Thu, 20 July 2006 13:43 Go to next message
Rikus is currently offline  Rikus
Messages: 10
Registered: June 2006
Location: South Africa
Promising Member
I trying to use OLEDB in my application. I am using MINGW compiler. It fails with error OleDBSession not found

Can anyone assist
Re: Compiling OLEDB using MINGW [message #4102 is a reply to message #4101] Thu, 20 July 2006 14:16 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Rikus wrote on Thu, 20 July 2006 07:43

I trying to use OLEDB in my application. I am using MINGW compiler. It fails with error OleDBSession not found

Can anyone assist

Add this line to your code (I suppose that oledb package is already in project):

#include <OleDB/OleDB.h>
Re: Compiling OLEDB using MINGW [message #4103 is a reply to message #4102] Thu, 20 July 2006 14:18 Go to previous messageGo to next message
Rikus is currently offline  Rikus
Messages: 10
Registered: June 2006
Location: South Africa
Promising Member
I did, but it still fails to compile. It looks like MINGW can not compile the code. Why is this?
Re: Compiling OLEDB using MINGW [message #4104 is a reply to message #4103] Thu, 20 July 2006 21:35 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Rikus wrote on Thu, 20 July 2006 08:18

I did, but it still fails to compile. It looks like MINGW can not compile the code. Why is this?


The best would be if you showed your code. Anyway I use oledb without any problem but I use VC++ 8.0. Why don't you download free vc7.1 toolkit and check if your code compiles?
Re: Compiling OLEDB using MINGW [message #4105 is a reply to message #4103] Thu, 20 July 2006 21:36 Go to previous messageGo to next message
rbmatt is currently offline  rbmatt
Messages: 90
Registered: July 2006
Location: Tennesse, USA
Member

Rikus wrote on Thu, 20 July 2006 08:18

I did, but it still fails to compile. It looks like MINGW can not compile the code. Why is this?

The package seems to compile for me. I guess it's something about your code. Zip up your project and attach it here. I'm sure someone will take a look at it.
Re: Compiling OLEDB using MINGW [message #4107 is a reply to message #4104] Fri, 21 July 2006 06:05 Go to previous messageGo to next message
Rikus is currently offline  Rikus
Messages: 10
Registered: June 2006
Location: South Africa
Promising Member
I used the VC7.1 and 8 and it works accept now when I reference MYSQL I get
LIBCMTD.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: _calloc already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: _free already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(setlocal.obj) : error LNK2005: _setlocale already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(osfinfo.obj) : error LNK2005: __open_osfhandle already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in
MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(winsig.obj) : error LNK2005: _signal already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(tzset.obj) : error LNK2005: __tzset already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dosmap.obj) : error LNK2005: __dosmaperr already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dosmap.obj) : error LNK2005: ___doserrno already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(vsprintf.obj) : error LNK2005: _vsprintf already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(_ctype.obj) : error LNK2005: _isxdigit already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(_ctype.obj) : error LNK2005: _isspace already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(_ctype.obj) : error LNK2005: _iscntrl already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(getenv.obj) : error LNK2005: _getenv already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(printf.obj) : error LNK2005: _printf already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(strtol.obj) : error LNK2005: _strtol already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(strtol.obj) : error LNK2005: _strtoul already defined in MSVCRTD.lib(MSVCR80D.dll)
LIBCMTD.lib(ismbbyte.obj) : error LNK2005: __ismbblead already defined in MSVCRTD.lib(MSVCR80D.dll)
MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: __stricmp already defined in LIBCMTD.lib(stricmp.obj)
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTSta
rtup
C:\upp\out\Debug\ACG\Extractor.exe : fatal error LNK1120: 1 unresolved externals

I am trying to write an app that will allow a user to extract data from OLEDB databases, MYSQL and Oracle
Re: Compiling OLEDB using MINGW [message #7087 is a reply to message #4101] Wed, 13 December 2006 11:22 Go to previous messageGo to next message
rrous is currently offline  rrous
Messages: 1
Registered: December 2006
Location: Czech Republic
Junior Member

I don't think MINGW can work with OLEDB.
There is a directive in OleDb.h:
#if defined(PLATFORM_WIN32) && defined(COMPILER_MSC)
So I guess, U can use it only on Windows and with Microsoft compiler.

In addition U have to install MDAC SDK (http://msdn.microsoft.com/data/ref/mdac/downloads/)

But I am not a programmer, so I could be completely wrong Wink

[Updated on: Wed, 13 December 2006 17:18]

Report message to a moderator

Re: Compiling OLEDB using MINGW [message #7089 is a reply to message #4107] Wed, 13 December 2006 11:56 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
Quote:

C:\upp\out\Debug\ACG\Extractor.exe : fatal error LNK1120: 1 unresolved externals

I am trying to write an app that will allow a user to extract data from OLEDB databases, MYSQL and Oracle



The problem is, that free MS kits do not have multithreaded debug libraries. Try to compile and link in Optimal [Release] mode.
Re: Compiling OLEDB using MINGW [message #7178 is a reply to message #7089] Sun, 17 December 2006 17:37 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
zsolt wrote on Wed, 13 December 2006 05:56

Quote:

C:\upp\out\Debug\ACG\Extractor.exe : fatal error LNK1120: 1 unresolved externals

I am trying to write an app that will allow a user to extract data from OLEDB databases, MYSQL and Oracle



The problem is, that free MS kits do not have multithreaded debug libraries. Try to compile and link in Optimal [Release] mode.


Latest MS SDK comes with MSC8 and has all libraries needed. It is now primary MS tool supported by U++.

Mirek
Previous Topic: MySQL and Sql class issue
Next Topic: MySql data types
Goto Forum:
  


Current Time: Mon Apr 29 03:40:15 CEST 2024

Total time taken to generate the page: 0.04238 seconds