Thread overview |
---|
February 13, 2006 Problem linking with dmc and gcc, please help | ||||
---|---|---|---|---|
| ||||
Hi, i have recently compiled with success the atlas library with cygwin under winxp (cblas library only, not fortran). I have tested that everything is working with (in cygwin): gcc -I/cygdrive/c/ATLAS/include -L/cygdrive/c/ATLAS/lib/evon1015v testblas.c -o testblas -lcblas -latlas Problem is that now i need to test the program with digital mars c++ and i have problem with the idde's project settings. I inserted the "include" and "lib" directorys in the directory tab, but i don't know how to pass the "-lcblas -latlas" option to the compiler. I hope it's possibile to compile a library with gcc and link it with dmc, as otherwise i won't be able to use dmc for numerical computing, where dmc's speed is really needed. Thank you in advance for your reply Greetings Stefano |
February 13, 2006 Re: Problem linking with dmc and gcc, please help | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefano | Stefano wrote: > Hi, i have recently compiled with success the atlas library with cygwin under > winxp (cblas library only, not fortran). > I have tested that everything is working with (in cygwin): > gcc -I/cygdrive/c/ATLAS/include -L/cygdrive/c/ATLAS/lib/evon1015v testblas.c -o > testblas -lcblas -latlas Problem is that now i need to test the program with digital mars c++ and i have > problem with the idde's project settings. > I inserted the "include" and "lib" directorys in the directory tab, but i don't > know how to pass the "-lcblas -latlas" option to the compiler. Click right on the project in the project tree. click on "Edit project..." set the "list files of type:" to "Library (*.lib)" type the name.ext of the lib in the field "File Name" click on button "Add" repeat for all libs click on button "Ok" link When the lib dir is correct the libs will be found and linked in. Should be when the lib (interface) is in C and the correct calling convention is used. When the lib (interface) is C++ forget it. Arjan > I hope it's possibile to compile a library with gcc and link it with dmc, as > otherwise i won't be able to use dmc for numerical computing, where dmc's speed > is really needed. > Thank you in advance for your reply > > Greetings > Stefano > > |
February 13, 2006 Re: Problem linking with dmc and gcc, please help | ||||
---|---|---|---|---|
| ||||
Posted in reply to Arjan | >Click right on the project in the project tree. >click on "Edit project..." >set the "list files of type:" to "Library (*.lib)" >type the name.ext of the lib in the field "File Name" >click on button "Add" >repeat for all libs >click on button "Ok" >link Having compiled the atlas library with gcc under cygwin i got two library: libclbas.a and libatlas.a (and header cblas.h) If i try to rename them to .lib and add them to the project as you suggested i get: "Not a valid library file" when i try to build the project. If i don't i get the myssing symbols errors. With gcc (and the associated syntax illustrated previously) i get no error, why? Also, my final goal is to able to use IT++ (see itpp.sourceforge.net) with dmc, after having compiled succesfully atlas and lapack with gcc on cygwin (alredy done this step). Thank you for your reply Stefano > >When the lib dir is correct the libs will be found and linked in. > >Should be when the lib (interface) is in C and the correct calling convention is used. > >When the lib (interface) is C++ forget it. > >Arjan > >> I hope it's possibile to compile a library with gcc and link it with dmc, as >> otherwise i won't be able to use dmc for numerical computing, where dmc's speed >> is really needed. >> Thank you in advance for your reply >> >> Greetings >> Stefano >> >> |
February 13, 2006 Re: Problem linking with dmc and gcc, please help | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefano |
If I remeber correctly Cygwin/Mingw generate COFF libraries and DM use OMF ones.
Try coff2omf from DM CD or better try to compile the library with DM compiler itself.
Other option is to generate a dll with cygwin and use it.
Regards,
Todor
On Mon, 13 Feb 2006 15:35:59 +0200, Stefano <Stefano_member@pathlink.com> wrote:
>
> Having compiled the atlas library with gcc under cygwin i got two library:
> libclbas.a and libatlas.a (and header cblas.h)
> If i try to rename them to .lib and add them to the project as you suggested i
> get:
> "Not a valid library file" when i try to build the project.
> If i don't i get the myssing symbols errors.
> With gcc (and the associated syntax illustrated previously) i get no error, why?
> Also, my final goal is to able to use IT++ (see itpp.sourceforge.net) with dmc,
> after having compiled succesfully atlas and lapack with gcc on cygwin (alredy
> done this step).
> Thank you for your reply
>
|
February 13, 2006 Re: Problem linking with dmc and gcc, please help | ||||
---|---|---|---|---|
| ||||
Posted in reply to Todor Totev | >If I remeber correctly Cygwin/Mingw generate COFF libraries and DM use O= MF = > >ones. I made a quick google search, seems true. >Try coff2omf from DM CD or better try to compile the library with DM = > >compiler itself. I used coff2omf and it converted the librabries. Now i don't get the lib error message, but the following warnings followed by the error (read also below....): *************************** link /CO /DE /NOPACKF /XN @cblas.LNK Warning: C:\DM_LIB\libcblas.lib(cblas_dgemv) (1468144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libcblas.lib(cblas_dgemv) (1468144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libcblas.lib(cblas_dgemv) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libcblas.lib(cblas_dgemv) (1230144): USE16/USE32 Mismatch : CONST Warning: C:\DM_LIB\libcblas.lib(cblas_xerbla) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libcblas.lib(cblas_xerbla) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libcblas.lib(cblas_xerbla) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libcblas.lib(cblas_xerbla) (1230144): USE16/USE32 Mismatch : CONST Warning: C:\DM_LIB\libcblas.lib(cblas_errprn) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libcblas.lib(cblas_errprn) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libcblas.lib(cblas_errprn) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_gemv) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_gemv) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_gemv) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_gemv) (1230144): USE16/USE32 Mismatch : CONST Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvT) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvT) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvT) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvT) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvT) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvT) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvT) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvT) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvT) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_dscal) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_dscal) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_dscal) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (1230144): USE16/USE32 Mismatch : CONST Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (1230144): USE16/USE32 Mismatch : CONST Warning: C:\DM_LIB\libatlas.lib(ATL_axpby) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_axpby) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_axpby) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_dgemvN) (1230144): USE16/USE32 Mismatch : CONST Warning: C:\DM_LIB\libatlas.lib(ATL_dcpsc) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_dcpsc) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_dcpsc) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_xerbla) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_xerbla) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_xerbla) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_xerbla) (1230144): USE16/USE32 Mismatch : CONST Warning: C:\DM_LIB\libatlas.lib(ATL_ddot) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_ddot) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_ddot) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_dset) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_dset) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_dset) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_daxpy) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_daxpy) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_daxpy) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_axpby) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_axpby) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_axpby) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_axpby) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_axpby) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_axpby) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib(ATL_dcopy) (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib(ATL_dcopy) (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib(ATL_dcopy) (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _TEXT Warning: C:\DM_LIB\libatlas.lib() (1230144): USE16/USE32 Mismatch : _DATA Warning: C:\DM_LIB\libatlas.lib() (6825628): USE16/USE32 Mismatch : _BSS Error: Segment Size Exceeds 64k : _TEXT Errors: 1 Warnings: 103 Build failed **************************************** Problem is that the altas lib come with a make script incompatible with dmc (it is for gcc), and i don't know how to hack it to be able to compile the library wth dmc. Do you have any suggestion/tutorial about this topic? Same is true with clapack and IT++. Also i think it's best to compile altas with gcc, as it's code has been optimized for it (you should also use very specific version of gcc to avoid performance penalty). >Other option is to generate a dll with cygwin and use it. Regards, Is it possibile to do so from the already built library? Or do i have to hack the make file? Thank you! Stefano |
February 13, 2006 Re: Problem linking with dmc and gcc, please help (SOLVED) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefano | I solved the problem, finally! The problem was that i was mixing 16bit with 32bit code becouse i selected dos and not winNT as platform. Thank you again for you help pointing me to coff2omf that solved all my problem. Greetings Stefano |
Copyright © 1999-2021 by the D Language Foundation