Comments (7)
@tt4g you can check this https://cmake.org/cmake/help/latest/command/target_link_libraries.html#target-link-libraries:~:text=A%20plain%20library%20name%3A%20The%20generated%20link%20line%20will%20ask%20the%20linker%20to%20search%20for%20the%20library%20(e.g.%20foo%20becomes%20%2Dlfoo%20or%20foo.lib).
from libpqxx.
you can check this
You repeatedly asked your own question in #383,
Is that comment the only one that explains the behavior I did not understand?
If so, I already know its CMake behavior specification.
What I didn't understand was that find_package()
should also look for libraries in the PATH
environment variable, but it failed to do so.
Nevertheless, when I pass only a string to target_link_libraries()
, it is able to link.
This is because the fact that it is linked means that libpq was found somewhere in the path contained in the PATH
environment variable.
This behavior appears to be inconsistent,
Furthermore, find_package()
could not find libpq when I defined the PostgreSQL_ROOT
variable.
The only way to investigate the reason for this would be to look at #383 author's machine.
from libpqxx.
@tt4g this is not about any issue i was letting you know,how target_link_libraries works when you give lib name
from libpqxx.
I don't know what you want to do by telling me that.
from libpqxx.
What I didn't understand was that
find_package()
should also look for libraries in thePATH
environment variable, but it failed to do so.
find_package tries to search the for -config.cmake or Config.cmake and it helps to find the lib's includes,binaries.We can specify the path to this file before find_package using set(packagename_DIR path),i agree it searches for the Config.cmake file in this order CMAKE_PREFIX_PATH,PATH you can check https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure how find_package searches for the config file
from libpqxx.
I don't know what you want to do by telling me that.
@tt4g i saw the comment #383 (comment) and just thought to help and learn,nothing else.
from libpqxx.
Suddenly such a comment is lost on me.
Because you were commenting on how to link a customized libpq just prior to that.
from libpqxx.
Related Issues (20)
- Conversion of TEXT[] to std::vector<std::string>. HOT 5
- error C2039: 'converts_from_string': is not a member of 'pqxx::string_traits<pgvector::Vector>' HOT 8
- Undefined references while compiling project HOT 17
- Static linking is not working, C++20, libpq REL_16_2, HOT 11
- Can I use stream_to to insert multiple records while one field is Postgis Geometry type? HOT 5
- std::optional<std::chrono::year_month_day> to DATE error if optional is empty HOT 4
- Encoding problems with bytea HOT 22
- Undefined refences when compiling example from the documentation HOT 10
- After compilation, there are only pqxx files but no pqxx.hxx files. Is this normal? HOT 31
- Rtti usage on demand HOT 6
- linking issue when using torch+pqxx in cmake. HOT 11
- Can't use libpqxx 7.9.0 from vcpkg in a Visual Studio 2022 C++ 17 project HOT 6
- Allow parsing arrays without connection HOT 21
- Any example to deal with time or date? HOT 2
- ERROR: Unsupported server version; 9.0 is the minimum. HOT 4
- Readthedocs /stable documentation page is empty. HOT 7
- Make pqxx iterators model the right iterator category HOT 9
- CMakeDetermineCompileFeatures throwing errors HOT 24
- `stream_to` uses `quote_name` as 2 argument function HOT 6
- std::ranges undefined? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libpqxx.