GLBasic forum

Main forum => GLBasic - en => Topic started by: backspace on 2012-Dec-26

Title: Linking GLBasic project to external .o library
Post by: backspace on 2012-Dec-26
I can include "c" header files within an INCLUDE statement. However, is it possible to link to an external (gcc  .a / .o) library, in order to use that library's functions in my compiled project?  If possible, how?
Thanks in advance.
Title: Re: Linking GLBasic project to external .o library
Post by: hardyx on 2012-Dec-26
I think you can pass parameters to the linker in Project > Options > Platform configuration > lnk and type -lname. The library must be in the form libname.a and only can be compiled for the platform of the .a object. For example, if the .a is compiled for pc (intel cpu) you can't compile for iPhone with uses ARM cpu.
Title: Re: Linking GLBasic project to external .o library
Post by: backspace on 2012-Dec-27
So if I wish to link to 'libddraw.a' I would add '-llibddraw.a' in the lnk text area. I think I get it.
Thanks hardyx.