Author Topic: ld.exe cannot find .lib  (Read 3512 times)

Offline Eli_A

  • Single posting newcomer
  • *
  • Posts: 3
ld.exe cannot find .lib
« on: June 26, 2022, 04:51:06 pm »
Hi all,

I get an error: "ld.exe cannot find -lPcap++" while running my program. I did the following modifications but the problem not resolved.

1) library files are in the correct directory C:/Eli/Projects/dRDI/test (See part of the Makefile below)

     PCAPPLUSPLUS_HOME := C:/Eli/Projects/dRDI/test
     # libs dir

     # libs
      PCAPPP_LIBS = -lPcap++ -lPacket++ -lCommon++
2) I have added its path to the linker:

    Setting > Compiler > Linker settings

3) I also changed the compiler for staticlib from "ar.exe" to "g++.exe" in Setting > Compiler >Toolchain executables>Linker for static libs: g++.exe

4) I checked the environment path to see if just one compiler is added

    Environment variables > Path > edit > add "C:\Program Files\CodeBlocks\MinGW\bin"

But I still get an error. I greatly appreciate if someone could help me solve my problem.

« Last Edit: June 26, 2022, 05:01:11 pm by Eli_A »

Offline skoroglyadov

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: ld.exe cannot find .lib
« Reply #1 on: November 22, 2022, 01:26:59 pm »
Good afternoon, did you manage to find a solution?