|
|
Home » U++ Library support » U++ SQL » SQL_mySQL reference problems
Re: SQL_mySQL reference problems [message #1649 is a reply to message #1647] |
Sat, 11 March 2006 13:45   |
aplatypus
Messages: 11 Registered: March 2006 Location: Newcastle, Australia
|
Promising Member |
|
|
Greetings friends ...
I have made one further discovery -- I suspect that the 'next' error will be readily resolved by a U++ aficinado.
The new library I made was in a directory with spaces in the name. When I moved this file to folder "c:\bin\mysql\UppMySql.a" from "c:\bin\mysql\C:\bin\MySQL\MySQL Server 5.0\bin\" that problem resolved itself. This is the new library deswcribed in Mirek's post about minGW and mySQl.
Also the file must use the "libUppMysql.a" extension. Earlier I made the error of calling it with a ".lib"-extension. The "lib"-part and the ".a"-extension are required.
However there is a further linking problem concerning the "_WinMain" entry point. I suspect that this will be a minGW issue. It seems so fundamental, I wondered if someone has already found a way to do this already.
cmd output: | ___main: duplicate
-> used: libmingw32.a:gccmain.o:1
-> discarded: libgcc.a:__main.o:1
1 undefined symbol(s):
_WinMain@16 (referenced from libmingw32.a:main.o:1; _main; .text)
linking aborted due to fatal errors
collect2: ld returned 1 exit status
|
This output is from the windows command line. The output window in TheIDE only said, ...
TheIDE output: | c++.exe: no input files
Exitcode: 1
|
I admit to being mildly confused here. Other GUI reference programs work OK. The SQL_MySql reference loks like it is a console program, may be that is the 'catch'.
In the meantime, I found this pearl. Concerning how ld works for minGW.
web search: | http://www.cygwin.com/ml/cygwin/2004-03/msg00194.html
To resolve _WinMain@16 with a symbol from your library, it needs to come *after* the library that needs it (/usr/i686-pc-mingw32/lib/libmingw32.a).
Unfortunately (for you), gcc/g++ puts all the default libraries *last* when it calls ld. You need to override that order.
.. link your app using the following command:
g++ -mwindows -mno-cygwin -o test.exe test.o -lmingw32 -L./ -lmaintest
|
There are some slow chips at the solution. Wiser heads are welcome. Is there some way to specify the exact commands to build with minGW? Why do other reference projects work with minGW?
I know everyone loves their own creations. I sincerly recommend that anything called a "reference" program include a comment certifying the "platforms it has been tested on", and the platforms it has not tested for if applicable.
It is an excellent system. Unfrotunately my use for U++ at the moment is with mingGW and SQL on Windows. I could go to the microsoft compilers -- Can anyone tell me if they have run the mysql with Microsoft c++? This is such a small problem -- keep up the good work!!
Aloha,
Will.
Kind regards,
aplatypus
________________________________________
[Updated on: Sat, 11 March 2006 14:24] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Apr 27 10:27:04 CEST 2025
Total time taken to generate the page: 0.00721 seconds
|
|
|