[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Linking on windows with mingw32
  [Thread Prev] | [Thread Next]
 
 
- Subject: Linking on windows with mingw32
- From: voker57 <voker57@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 2 Aug 2011 20:34:58 +0400
- To: libssh@xxxxxxxxxx
Hello I'm trying to compile an example program (attached): > E:\>gcc -Ilibssh/include -Llibssh/lib -lssh example.c > C:\DOCUME~1\VOKER5~1.VOK\LOCALS~1\Temp\ccfW7n39.o:example.c:(.text+0xf): undefined reference to `_imp__ssh_new' > C:\DOCUME~1\VOKER5~1.VOK\LOCALS~1\Temp\ccfW7n39.o:example.c:(.text+0x21): undefined reference to `_imp__ssh_free' > collect2: ld returned 1 exit status What am I doing wrong? My environment: libssh that I compiled myself with same version of mingw32 gcc (4.5.2), I copied C:\Program Files\libssh to current folder for easier path writing.
#include <libssh/libssh.h>
#include <stdio.h>
int main () {
   ssh_session my_ssh_session;
    my_ssh_session = ssh_new();
  
   ssh_free(my_ssh_session);
   return 0;
}Attachment:
signature.asc
Description: Digital signature
Archive administrator: postmaster@lists.cynapses.org

