I'm making a project that's going to use the FTP features of libcurl. Because I am planning on distributing my program, I copied all the header and source files from the libcurl lib folder into my program. When I built my program, I got a load of errors that stuff couldn't find other stuff, so I added libcurl.lib to the additional libraries and -lcurl to other linker options and copied libcurl.lib to my project folder and now the only error I get is 'ld.exe cannot find -lcurl'. I tried adding the project folder (the place where libcurl.lib is) to the linker search paths, but I still get the error. What happened to cause this?
(I posted this on StackOverflow but I got no answers. Hopefully I'll get some here :)
I remember trying that, but it still didn't work. (I'm using WinINet now so I don't need to download and setup any libraries because its part of windows :D)
Did you add the right path in your lib directories? If you just plopped the lib in a file, outside of PATH, that is even one directory deeper then the one your compiler is told to look in then it won't find it.
I think he means his project dir.
AFAIK, on Windows it's totally usual to have dlls shipped with released software. There's nothing wrong about having headers etc. somewhere in you project directory...
JoR: I disagree. It's fine to have a local build of a library, but the library should always remain intact as a unit unless you have the need and ability to port and test the library in your environment.
programmer47: I recomend you build and install the library using the library's build mechanism. Do not copy the files into your project, just use the installed library.
When you distribute your application, then distirbute the library with your app as binary. How exactly you do that depends the deployment method/platform and so on.
I see what you mean. But it's often not easy to build a 3rd Party lib from source without the build system. Plus, it may not work as expected if built with the wrong flags. You just don't know until you test it.