Menu

how to use .lib file

2003-02-12
2012-09-26
  • Nobody/Anonymous

    I get some .lib file to work with in my program !
    I had add this: #pragma comment(lib, "fltdata.lib")
    in the head of  my code,and the fltdata.lib was copied to de
    devc++\lib directory!( I had try to add a dirctory in the setting,
    it did't work)
    I had alse add" -lfltdata" in the linker options
    but the ld.exe allways told me:
    "cannot open -lfltdata: No such file or directory"
    even i fill a full dirctory int the linker options ,it gave me the same answer?
    Did some one have some idea about it?

     
    • Nobody/Anonymous

      It just because the way gcc's linker scans its libraries directories. Library files should always start with the prefix 'lib' and with the '.a' suffix. Thus if you had a librairy called my_wonderful_lib, the file should be named libmy_wondeful_lib.a.
      You may try to rename your library libfltdata.a and copy it to the right directory but I 'm not sure this lib will be compatible with mingw since it doesn't seem to have been compiled with a gcc-like compiler. But It won't cost you anything to have a try...

      Don't ever give up, trust your instincts !

      Ray Ja Mee.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.