Toon posts:

[Borland C++] Linker error: mysqlclient.lib

Pagina: 1
Acties:

Verwijderd

Topicstarter
Beste mede-tweakers,

Ik zit met een probleem. Ik weet dat er al genoeg topics zijn geweest over Mysql++ en Borland C maar ik kon daar het antwoord op mijn vraag niet vinden.

Het probleem is dat ik een simpele connectie wil leggen tussen mijn mysql server ( gewoon apache met mysql en php ) en mijn c++ programma dat gecompiled wordt door Borland C Builder 6. Het is niet zozeer de connectie die niet tot stand wilt komen want tot daar ben ik nog niet eens gekomen.

Ik heb de MySQL manual al raadgepleegd maar die kwam met een oplossing die bij mij niet blijkt te werken:
The Borland linker does not like the "libmySQL.lib" library that comes with MySQL, it gives this error message:

Error: 'LIBMYSQL.LIB' contains invalid OMF record, type 0x21 (possibly COFF)

You can get around this problem by using the "dll" version of the library. Copy "libmySQL.dll" and execute the following two command lines in a DOS box:

implib libmySQL.lib libmySQL.dll
impdef libmySQL.def libmySQL.dll

This will create a new "libmySQL.lib" file which you can use in your projects. Works like a dream, your compiled program will automatically load "libmySQL.dll" when needed (make sure your program can find it, for example by placing a copy in the same directory as your program).
Het punt is dat het bij mij niet gaat om de 'libmysql.lib', aangezien die gewoon goed werkt, maar om de 'mysqlclient.lib'. Hier heb ik geen .dll van en wanneer ik deze include in mijn project en compile krijg ik dus de volgende error:

[Linker Error] 'C:\APACHE\MYSQL\LIB\DEBUG\MYSQLCLIENT.LIB' contains invalid OMF record, type 0x21 (possibly COFF)

Ik heb al uren doorgebracht op google.nl en dergelijke om een oplossing te vinden maar ik kan gewoon echt niets vinden.

Ter informatie hier nog een screenshot:
screenshot van project omgeving

Is er iemand die mij kan helpen met dit probleem?

Alvast bedankt,

Michel

Verwijderd

Topicstarter
niemand? :(
Modbreak:Zie Algemene gedragsregels (Netiquette) #not-done
een topic kicken binnen 24 uur wordt niet op prijs gesteld. :)

[ Voor 87% gewijzigd door gorgi_19 op 24-10-2004 23:24 ]


  • Bleh!
  • Registratie: Januari 2000
  • Laatst online: 07:35

Bleh!

:)

Uhmm via google krijg ik:
Q: How to fix linker errors that say: "Invalid OMF record type 0x21 (possibly COFF)"

Answer

This error usually occurs when you try to link with a LIB file or an OBJ file that is not compatible with Borland's OMF file format. This typically happens when dealing with libraries from third party vendors. Often times, the third party vendor will supply you with a LIB file that is in Microsoft's COFF format. The Microsoft COFF format is incompatible with Borland's OMF format.

The best solution is to obtain Borland compatible files from the third party vendor. Unfortunately, many third party vendors will simply ignore you. If this happens to you, your choices are limited.
Oh ja, kicken van je topic kun je beter pas na 24h doen...

Toen plassen pissen werd, is het gezeik begonnen.


Verwijderd

Als je de source code van de MySQL Client lib niet hebt dan zit je dus met een probleem.
Is misschien geen oplossing voor dit specifieke probleem maar kun je niet uit de voeten met dbExpress?
En waarom link je de libmysql.dll mee in je project?

[ Voor 13% gewijzigd door Verwijderd op 25-10-2004 12:18 ]


Verwijderd

Probeer die libfile anders eens naar OMF formaat om te zetten met de applicatie 'coff2omf.exe' in je borland/bin dir