Author Topic: Linking to win32 libarys using C::B  (Read 86 times)

Offline Alfred96

  • Single posting newcomer
  • *
  • Posts: 8
Linking to win32 libarys using C::B
« on: November 06, 2018, 03:38:23 pm »
Hi all,

I am trying to use a windows libary namely: PSAPI.DLL

How do I link to it to resovle the external dependencies, in MSVC++ I go to Project -> settings and add "psapi.lib" to the list Link tab.

An example error is:
.objs\main.o:main.cpp:(.text+0x1d0): undefined reference to `GetModuleBaseNameA@16

Many thanks,

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2062
Re: Linking to win32 libarys using C::B
« Reply #1 on: November 06, 2018, 04:57:06 pm »
Project->Build otpions->Select the project name on the left->Linker settings->link libraries->add

But keep in mind that the library has to match the compiler....