Página 1 de 1

What kind of libraries can uesd with MinGW

Publicado: Mié Dic 26, 2012 10:02 am
por Xailer
Hello Team
I must link two omf (or coff)type libraries to lock my application (copywrite). Trrying to link with MinGW enabled i take the following errors (see photo). Also i noticed that MinGW has a problem with complex paths. Is it true ?

In the following code
170. #include "winlicenseSDK.h"
At link time raising the following error
Compiling: WL_Module.prg...
In file included from C:DevelopmentSourceWL_Module.prg:170:0:
and these lines of code

14.#pragma comment(lib, "C:xailer3LibWinLicenseSDK32.lib")
19.#pragma comment(lib, "C:xailer3LibSecureEngineSDK32.lib")

raising the following errors:
C:DevelopmentInclude/winlicenseSDK.h:14:0: warning: ignoring #pragma comment [-Wunknown-pragmas]
C:DevelopmentInclude/SecureEngineSDK.h:19:0: warning: ignoring #pragma comment [-Wunknown-pragmas]
1 Files, 2 Warnings, 1 Errors
Compile time: 0.47s Link time: 0s Total time: 0.51s
These libraries are important for locking my programs. So my first priority is if those libraries are compatible with MinGW compiler or must remain in the BBC++.
Any help would be appreciate
T.I.A

Attached files

What kind of libraries can uesd with MinGW

Publicado: Jue Dic 27, 2012 12:45 pm
por jfgimenez
Xailer escribió el mié, 26 diciembre 2012 10:02Hello Team
I must link two omf (or coff)type libraries to lock my application (copywrite). Trrying to link with MinGW enabled i take the following errors (see photo). Also i noticed that MinGW has a problem with complex paths. Is it true ?


Libs for MinGW have to be named in the form "lib" + <library_name> + ".a". That is, they have to be prefixed by "lib" and their extension have to be ".a". When MinGW doesn't find a library in that form, it tries to link a file called as usual, but then it must be a library in COFF format, not OMF like BCC used. So, my advice is to name the libraries for MinGW as it likes (libXXXXX.a) to avoid mix them with traditional ones.
Cita:
In the following code
170. #include "winlicenseSDK.h"
At link time raising the following error
Compiling: WL_Module.prg...
In file included from C:DevelopmentSourceWL_Module.prg:170:0:
and these lines of code

14.#pragma comment(lib, "C:xailer3LibWinLicenseSDK32.lib")
19.#pragma comment(lib, "C:xailer3LibSecureEngineSDK32.lib")

raising the following errors:
C:DevelopmentInclude/winlicenseSDK.h:14:0: warning: ignoring #pragma comment [-Wunknown-pragmas]
C:DevelopmentInclude/SecureEngineSDK.h:19:0: warning: ignoring #pragma comment [-Wunknown-pragmas]
1 Files, 2 Warnings, 1 Errors
Compile time: 0.47s Link time: 0s Total time: 0.51s

That #pragma is only for BCC, not for MinGW. If you need those libraries, just add them to your project in either the "project properties" form or directly as any other file in the project manager's tree.
Regards,
Jose F. Gimenez

What kind of libraries can uesd with MinGW

Publicado: Vie Dic 28, 2012 6:24 pm
por Xailer
Hello Jose
Many thanks for your instructions. Renaming the files as you told me and with somes mods in header files works with both compilers.
Once again many thanks to Ignacio to you and Josi.
Happy new Year
All the best for Spain & Greece to go ahead......
TIA