Thread: library files in Netbeans

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    21

    library files in Netbeans

    So I've recently began using the C/C++ module of the Netbeans develpment software and seem to be having trouble linking a particular library file, a .lib file to be exact. The problem arises when I try to build the whole project; I get a message like this:

    g++.exe -o dist/Debug/Cygwin-Windows/slm build/Debug/Cygwin-Windows/main.o -LC:/Users/Jacob/SLM -lSlmDrvr.lib
    /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lSlmDrvr.lib
    collect2: ld returned 1 exit status


    My question is, why can't the linker find that library?, or, if I'm really stupid (which isn't stretching it much), is that even the problem to begin with?

    I've done everything obvious, ie changing the Path in the system variables on my machine, placing that library file in every folder that contains libraries on my machine, adding the directory the file is in to the linker's search path. Any suggestions?




    -----------------------------------------------------------------------------------------------------
    Evreyone starts out ignorant.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > -lSlmDrvr.lib
    IIRC, the suffix does not need to be specified, so perhaps -lSlmDrvr assuming the real filename is SlmDrvr.lib
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    21
    Thanks for trying, the problem vanished when I switched to visual c++ instead

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-01-2009, 04:53 PM
  2. VC++ 6 question: browsing into a library
    By maxhavoc in forum Tech Board
    Replies: 4
    Last Post: 09-15-2006, 06:57 AM
  3. Need help with audio library on DOS...
    By Marton79 in forum C Programming
    Replies: 10
    Last Post: 08-25-2006, 12:32 AM
  4. dll files and library files
    By Boomba in forum C++ Programming
    Replies: 1
    Last Post: 06-11-2004, 10:09 AM
  5. reinserting htm files into chm help files
    By verb in forum Windows Programming
    Replies: 0
    Last Post: 02-15-2002, 09:35 AM