Status & Roadmap
Authors & License
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 previous message
ptkacz is currently offline  ptkacz
Messages: 89
Registered: March 2017
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?


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

Report message to a moderator

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

Current Time: Tue May 11 02:52:41 CEST 2021

Total time taken to generate the page: 0.01360 seconds