Thread: trouble compiling

  1. #1
    i want wookie cookies the Wookie's Avatar
    Join Date
    Oct 2002

    trouble compiling

    hey guys,

    i have a problem, i can't figure it out. i'm not that familliar with g++, and ive been mulling around trying to figure this out, but i cant

    i have a directory, with


    i'm tring to compile main.cpp including the files in /includes, and also the libraries in /lib
    The library are .so (shared object?)
    Here's my command line so far:

    g++ -I/path/to/includes -L/path/to/lib -llibldapsdk -llibldapssl main.cpp -o ldap_auth

    It says it cant find <ldap.h> or <ldap_ssl.h>, when they're in the /includes folder, and it gives cannot find the libraries, theyre


  2. #2
    Join Date
    Mar 2005
    >> g++ -I/path/to/includes -L/path/to/lib -llibldapsdk -llibldapssl main.cpp -o ldap_auth

    try to use -l without the lib prefix... gcc strips it when parsed... so it should be

    g++ -I/path/to/includes -L/path/to/lib -lldapsdk -lldapssl main.cpp -o ldap_auth

    as for your include problems, post the exact include path string you are using and I may be able to help.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Trouble Compiling 1394 Development Libraries for Linux
    By Phanixis in forum Linux Programming
    Replies: 6
    Last Post: 10-05-2007, 10:48 AM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. Is it so trouble?
    By Yumin in forum Tech Board
    Replies: 4
    Last Post: 01-30-2006, 04:10 PM
  4. trouble compiling
    By chris285 in forum C++ Programming
    Replies: 5
    Last Post: 04-27-2003, 10:40 AM
  5. I am Having trouble Compiling with DirectX
    By Irish-Slasher in forum Game Programming
    Replies: 4
    Last Post: 03-14-2002, 09:51 AM