I did all that and double checked it. My source simply looks like this:
#include <mysql++.h>
int main()
{
return 0;
}
Upon compilation I get this small set of linking issues now:
c:\www\MYSQLI~1>gcc sqltest.cpp -o sqltest.exe -lmysqlpp -lmysqlclient
C:\Users\Clay\AppData\Local\Temp/ccyCz0l7.o:sqltest.cpp:(.text+0xd):
undefined r
eference to `std::string::size() const'
C:\Users\Clay\AppData\Local\Temp/ccyCz0l7.o:sqltest.cpp:(.text+0x60):
undefined
reference to `std::string::operator[](unsigned int) const'
C:\Users\Clay\AppData\Local\Temp/ccyCz0l7.o:sqltest.cpp:(.text+0x9e):
undefined
reference to `std::string::operator[](unsigned int) const'
C:\Users\Clay\AppData\Local\Temp/ccyCz0l7.o:sqltest.cpp:(.text+0xcc):
undefined
reference to `std::string::operator[](unsigned int) const'
C:\Users\Clay\AppData\Local\Temp/ccyCz0l7.o:sqltest.cpp:(.text+0x14d):
undefined
reference to `std::ios_base::Init::Init()'
C:\Users\Clay\AppData\Local\Temp/ccyCz0l7.o:sqltest.cpp:(.text+0x171):
undefined
reference to `std::ios_base::Init::~Init()'
collect2: ld returned 1 exit status
Sincerely,
Clayton Weaver
Joel Fielder wrote:
> Please make sure you have read and understood README-MinGW.txt. It
> applies to your own projects using mysql++ as well as the library
> itself. Specifically, the prerequisites:
>
> 1) MySQL C Development Files. (Hint: include path to mysql headers).
> 2) MySQL C API DLL Import Library. (Hint: if you built the examples
> ok, this should be satisfied already, but if not you'll get a link
> error).
>
> Joel
>
> Specter Phoenix wrote:
>> Didn't catch that I had forgotten to copy files to my directory but
>> now, after copying all files to lib and include under MinGW I pass
>> the commandline the commands of g++ sqltest.cpp -o sqltest.exe
>> -lmysqlpp -lmysqlclient and hit enter just to receive this error
>> cluster now.
>
>