c++qtopensslundefined-referencecflags

Edit Makefile line: CFLAGS from Qt C++


I'm quite new to programming but I got really stuck with this so I hope you can help me.

I got a problem using the openssl/hmac.h

the Error Output:

undefined reference to EVP_sha1

So I googled and found something: https://bbs.archlinux.org/viewtopic.php?id=131726

It's the exact same Problem as mine... this might be really stupid but I just don't know how to change the Line in the Makefile with the CFLAGS to the ones shown in the link :(

Just can't edit it via the makefile cause Qt will overwrite everything and I just don't figure out an other way to do this.


Solution

  • I'm assuming you're using qmake here.

    Yes, to avoid Makefile corruption, the Makefile itself calls again the qmake...

    But you have two variables you can edit for your purposes in your .pro file: QMAKE_CXXFLAGS and QMAKE_CFLAGS.

    HERE you can find the qmake reference