Pelles C forum

Pelles C => General discussions => Topic started by: tpekar on February 26, 2010, 05:12:29 PM

Title: linking in .lib objects
Post by: tpekar on February 26, 2010, 05:12:29 PM
Help!  I have created a couple of .lib objects.  When I try to link them in at compile time and create an .exe, I get the message "POLINK: error: Unresolved external symbol" followed by '_myfunction'. where myfunction is my function in the .lib object.  I have the .lib objects in the \program files\PellesC\Lib folder.  What am I doing wrong?
Title: Re: linking in .lib objects
Post by: CLR on February 27, 2010, 12:47:39 AM
You should add your.lib in Linker Tab.

Menu Project -> Options -> Linker
Title: Re: linking in .lib objects
Post by: Vortex on February 27, 2010, 09:44:55 AM
Another option is to use the #pragma statement :

Code: [Select]
#pragma lib "user32.lib"