GCC -l (link library option) showing same output when not linked

  c++, docker, gcc

I have question about gcc compiler link library option.
I an running gcc compiler from docker container.
when I try to compile by typing in
"g++ -Iinclude -Llib_x86 *.c *.h -o main",

output shows following :
undefined reference to "secure_ClearStream"
undefined reference to "proc_readProcess"
undefined reference to "proc_getOutput"
.. (and 16 more functions from both secure.a and proc.a library)

and then I tried linking library option using -l by typing in
"g++ -Iinclude -Llib_x86 *.c *.h -o main -l:secure.a -l:proc.a"

it shows following as well

output shows following :
undefined reference to "secure_ClearStream"
undefined reference to "proc_readProcess"
undefined reference to "proc_getOutput"
.. (and 16 more functions from both secure.a and proc.a library)

which is exactly same. compiler does not throw error about linking library, and it is pretty weird why it still is not finding function description if it successfully linked library.
I am pretty sure library exist in "lib_x86" directory, and I’d like to understand why it is happening.

I’d like to screenshot output but I can’t tell you more detail due to security issue. For those who have already faced similar situation, can you share your experience?

Thanks in advance ­čÖé

Source: Windows Questions C++

LEAVE A COMMENT