Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during complie #4

Open
HuangFeiY opened this issue Jan 26, 2023 · 0 comments
Open

Error during complie #4

HuangFeiY opened this issue Jan 26, 2023 · 0 comments

Comments

@HuangFeiY
Copy link

I try to use ubuntu 20.04 to run this software.
I first use command below and install libcurl successfully.

sudo apt-get install libcurl4-openssl-dev 

However, when I try to compile the program using command below, an error occur

g++ -std=gnu++11 -lcurl idsEventGenerator.cpp

My g++ version is 9.4.0

And the detail information:

/usr/bin/ld: /tmp/cc9j7hq0.o: in function `sendRulePacket(snortRule*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)':
idsEventGenerator.cpp:(.text+0x502f): undefined reference to `curl_global_init'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x5034): undefined reference to `curl_easy_init'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x51b3): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x51d1): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x51ef): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x520d): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x5223): undefined reference to `curl_slist_append'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x5240): undefined reference to `curl_slist_append'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x5364): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x53bb): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x5405): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x556f): undefined reference to `curl_slist_append'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x6121): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x615e): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x618e): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x634b): undefined reference to `curl_slist_append'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x65f1): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x6694): undefined reference to `curl_slist_append'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x66bb): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x66e6): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x672b): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x6752): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x6770): undefined reference to `curl_easy_setopt'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x677f): undefined reference to `curl_easy_perform'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x679b): undefined reference to `curl_easy_strerror'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x6809): undefined reference to `curl_easy_getinfo'
/usr/bin/ld: idsEventGenerator.cpp:(.text+0x6850): undefined reference to `curl_easy_cleanup'
collect2: error: ld returned 1 exit status

I'm confused and try to ask for solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant