A r t i c l e s
Navigation

Note: This Wiki is
outdated, personal views
may have changed.
L505 A.I. bot is dead
long live THX 1138

M a i n P a g e

D i r e c t o r y

Library Naming Tips For Cross Platform


With regards to the freepascal compiler:
library lib1test;

procedure something; stdcall; 
begin
  writeln('test');
end;

exports
  something;
begin
end.
Don't name your library something like "librarytest" or "lib1test" because if you are compiling on linux this is confusing for the compiler when you try to IMPORT your library functions and procedures. The compiler will interpret the "lib" part of your name and find it redundant on linux, and trim it for you when you didn't mean it to. Libraries on linux and windows should be named anything BUT something with the letters "lib" in them.

Since linux adds the lib prefix for you, having two "lib"s in your library will only confuse the compiler. If your library is called "librarytest" and youtry to compile an executable linking to this library, the compiler will actually try and pull in "rarytest" instead of "liblibrarytest".

About
Note: This Wiki is outdated, personal views may have changed.

This wiki contains info on life, health, humans, nature, programming, database, fads, paradigms, poems, principles, theories.

Articles may contain statements which some may find helpful and encouraging, or even discouraging.

Beware, I believe in the Grand Justice system.
_ _ _