Author Topic: Linking GLBasic project to external .o library  (Read 1555 times)

Offline backspace

  • Mr. Drawsprite
  • **
  • Posts: 53
    • View Profile
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.
I came, I saw, I coded.

Offline hardyx

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 505
    • View Profile
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.

Offline backspace

  • Mr. Drawsprite
  • **
  • Posts: 53
    • View Profile
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.
I came, I saw, I coded.