Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

gcc error "undefined reference to ..."

pi_trekpi_trek Member Posts: 13
Hi!

I'm using cygwin shell and I try to compile a program. During the compilation gcc shows error - undefined reference to 'RC4', 'MD5_init', 'd21_509', etc. I've install ssl, but it isn't help. Have you got any idea, what can be wrong?

THX
Piotrek

Comments

  • vasialekvasialek Member Posts: 56
    : I'm using cygwin shell and I try to compile a program. During the compilation gcc shows error - undefined reference to 'RC4', 'MD5_init', 'd21_509', etc. I've install ssl, but it isn't help. Have you got any idea, what can be wrong?

    All this functions are in libraries, where could be in /usr/lib/ or somewhere else. See where u installed ssl. So, u need to link this libraries to your code. Option -L tell gcc to where look for libraries.
    For example, I have MySQL installed in /usr/local/mysql & its libraries in /usr/local/mysql/lib/. For linking with libmysqlclient.a I do:

    g++ -L/usr/local/mysql/lib my_prog.C -lmysqlclient

    Lekha

  • Andre YoungAndre Young USAMember Posts: 0

    __ \ http://forcoder.org \ free video tutorials and ebooks about [ R, PHP, Perl, Visual Basic .NET, C#, Java, PL/SQL, Assembly, MATLAB, Visual Basic, Ruby, C++, JavaScript, Go, Objective-C, C, Swift, Scratch, Python, Delphi LabVIEW, FoxPro, Awk, Lisp, Prolog, Transact-SQL, Bash, Julia, Crystal, Dart, Rust, SAS, D, Hack, Scheme, Apex, Kotlin, Alice, COBOL, Ada, Fortran, Clojure, Logo, Lua, VBScript, ML, Scala, ABAP, F#, Erlang ] _____

Sign In or Register to comment.