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 » Linking issue...cmd line vs U++ vs Codeblocks...
Linking issue...cmd line vs U++ vs Codeblocks... [message #49681] Mon, 02 April 2018 07:25 Go to next message
ptkacz is currently offline  ptkacz
Messages: 88
Registered: March 2017
Member
Hi guys,

In the process of creating some new code, a small test app was put together to test connecting to a PostgreSQL database making use of PGXX (see the attachment, DatabaseTest.cpp).

From command line, the program was able to be compiled (i.e. g++ DatabaseTest.cpp -o ct -lpqxx -lpq) and run successfully. No compiler or link issues were encountered. Expected results were returned!

Similarly a U++ Console App with no U++ was created and compiled, but with linker issues. For example: ... (13): undefined reference to `pqxx::connection_base::is_open() const'

Just to be sure that the dev environment is set up correctly, this evening, version 16 of Codeblocks was installed. The same test app was compiled and linked without any issue. Upon pressing the play button, a console window displayed with expected results. The only thing needing to be done was providing the linker options of, "-lpqxx -lpq" to codeblocks.

In U++, I've only specified the following:

    Common Link Options: -lpqxx -lpq
    Debug Link Options: -lpqxx -lpq
    INCLUDE DIRECTORY PATHS: Non-specified (TheIDE identified the include files)
    LIB Directories: /usr/lib/x86_64-linux-gnu

Even attempting to not specifying any paths.


Why is it that U++ is having difficulty linking successfully?



Peter






[Updated on: Wed, 04 April 2018 03:08]

Report message to a moderator

SOLVED: Re: Linking issue...cmd line vs U++ vs Codeblocks... [message #50402 is a reply to message #49681] Wed, 17 October 2018 04:50 Go to previous message
ptkacz is currently offline  ptkacz
Messages: 88
Registered: March 2017
Member
Adding PostgreSQL package allows one to link the Postgres C library to one's U++ application!

[Updated on: Wed, 17 October 2018 04:59]

Report message to a moderator

Previous Topic: Adjusting the Z order of a dialog window?
Next Topic: [Solved] Recursively loop through XML node
Goto Forum:
  


Current Time: Fri Feb 26 10:12:20 CET 2021

Total time taken to generate the page: 0.02178 seconds