|
Curious about something |
Bob Keane
Member #7,342
June 2006
|
I had a problem compiling and linking enet and was able to solve it. The problem was the PKG_CONFIG_PATH was not finding the elibnet.pc file. Research suggested copying the file to /usr/lib/pkgconfig. I did that and ran ldconfig but I still could not compile. Finally, I used EXPORT to add the pkgconfig folder to the search path and it compiles and links properly. I was just wondering why using EXPORT works but not the other way. Any ideas? I'm using Fedora 25. By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Gideon Weems
Member #3,925
October 2003
|
bamccaig
Member #7,536
July 2006
|
Could you elaborate on what you mean by you used "EXPORT"? I am not sure what you mean. If the file existed in /usr/lib/pkgconfig then you shouldn't have had to edit any search paths. If the file existed elsewhere and you added it to PKG_CONFIG_PATH then it makes me think you mean the built-in shell 'export' command. In most Unix shells, there are [at least] two kinds of variable: regular variables and environment variables. Environment variables are part of the system process and copied to child processes automatically. Regular variables are only known to the shell. The export command is used to promote a regular variable to an environment variable. If this is the case, if you don't export the variable [and it's not already an environment variable], when you launch a child process like make or cmake the value is not copied and it reverts to nothing from within those processes. If that doesn't help then please elaborate on what you mean... -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Gideon Weems
Member #3,925
October 2003
|
Bob Keane
Member #7,342
June 2006
|
The problem is solved, so it is not an issue. I'm just not sure why the environmental variable won't stick. By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
|