trouble compiling

This is a discussion on trouble compiling within the Linux Programming forums, part of the Platform Specific Boards category; hey guys, i have a problem, i can't figure it out. i'm not that familliar with g++, and ive been ...

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

    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

    /lib
    /includes
    main.cpp

    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 in.so

    help!
    Thanks

  2. #2
    xhi
    xhi is offline
    !anExpert
    Join Date
    Mar 2005
    Location
    pa
    Posts
    155
    >> 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, 03: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, 08:51 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21