Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » The linker does not find a .lib file
The linker does not find a .lib file [message #49429] Fri, 09 February 2018 12:27 Go to next message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Hi there,
this is probably a really silly question.

I am writing an application who will communicate with a device through a RS232 port. I am using a library called "serial" downloaded from the web. I have built the library (using Visual Studio, as per instructions, because there is a visual studio project file included in the package) and obtained a file called "serial.lib". I created a directory called "serial" (in the same directory where my application directory is) and copied the headers file in it. Then I included the header file in my UPP project (#include <serial/serial.h>) and put the .lib file in c:\libraries. Then in UPP: Setup->Build methods, in the LIB directories tab, I added C:\libraries. The application compiles successfully, but I get a LNK2019 error from the linker.
Thanks for any help.
Gio
Re: The linker does not find a .lib file [message #49430 is a reply to message #49429] Fri, 09 February 2018 13:08 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
Hello Giorgio,

There is one more step.
In TheIDE, right click on your package, then select the "package organizer".
IT will open the package organizer.
You need to add the library as a "library" (right click -> "new libraries"); (E.g. to use dbus, you need to add "dbus-1" as a library, in the package organizer)
This tells the linker which library to use.

Best regards,
Oblivion


[Updated on: Fri, 09 February 2018 13:15]

Report message to a moderator

Re: The linker does not find a .lib file [message #49436 is a reply to message #49430] Fri, 09 February 2018 14:56 Go to previous message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Thanks, it worked!
Previous Topic: Core\Mt.ccp
Next Topic: LocalProcess2 doesnt show child app window (it is running)
Goto Forum:
  


Current Time: Thu Mar 28 19:04:22 CET 2024

Total time taken to generate the page: 0.01578 seconds