How do I link a library file in Dev c++?
How do I link a library file in Dev c++?
Right click on your project (left window), choose project options, browse and select the needed library (to link up with).
i believe you are looking for the .a in the lib directory. meow.
I went to the projects options and click on the Parameters tab. Add a the library, but came
back with an [Build Error] [file.exe] Error 1. Also is in the MakeFile.win.
Not sure if this helps, but I'm trying to link a .a library.
I tried placing a copy in Dev's library directory it was still unsuccessful at linking the library.
Last edited by newbe; 01-16-2010 at 01:54 PM.
I dont use DevC++, so Im not familiar with the IDE's interface. Are you making sure your linking statically, since .a usually means its a static library, while .so or .dll means dynamic library.
If your code is short enough, especially if your using only standard stuff (that I and others on Linux could immediately test without additional software), I would suggest to post it so we can try it out.
Nah, that's not right. You want the project options general tab, not the parameter's tab. If necessary, rebuild your project from scratch, meaning goto menu, create new project, select app. type (ie. console, win32), that'll create a barebones main.cpp file. If all you're dealing with is one main code file, simply copy n' paste over the main.cpp file (do any includes, or add resource file if needed thru the menu option, add resource file) then save your project.
Then reopen with the project file, goto menu, project options; under general tab, you'll see the button add/browse library (or object) button. Select desired file, click ok. Link is done, save and compile (you'll be prompted to save before compiling the project). If you get a linking error (during failed compilation attempt), then it's likely you're in need of another library as well or in lieu of the one earlier selected. ..
i add to projects libstdc++.a because it covers iostream and std stuff