I was trying to programmatically include a library file within my Codewarrior project: i don't wanna include it by selecting a file and adding it via the IDE, i wanna be able to include a library file as soon as a preprocessor directive with "#pragma comment(lib, "mylib.lib")".
Well, due to a Nokia error, the "vibractrl.dll" file is missing on a Nokia 6600 v4.09.1- and some other phones, so if you link with the "vibractrl.lib" library, running the generated app will result in a runtime error.
I wanna be able to build different version of my app and by using a "#pragma" will simplify my life because i would only have a simple preprocessor switch instead of a full Codewarrior project messing.
I think the gcc toolchain is missing this pragma but it would be usefull to have something like this!
Static linking on symbian (and windoze, but not all flavours of UN*X, where the failure occurs when the symbol that is being referenced cannot be loaded) means that when the loader (ie. at run time) tries to load the DLL (in this case your APP), it will fail due to missing libraries.
I believe what you are trying to achieve is runtime loading, or put simply to load this libarary and call functions therefrom if this library exists.
Look in the "Dynamically Loading Link Libraries" of the SDK help for how this can be done.
(Use RLibary Load to load the lib , Lookup() to get a pointer to the function by ordinal that you wish to call)