|
From: Per W. <pw...@ia...> - 2003-11-23 14:04:19
|
If you want to link in own code without using cpp files, you should create a library, i.e. incorporate one or more .o files into a libxx.a file. Then just place the lib file into your normal library directory, and then add the option -lxx to the project. /Per W On Sun, 23 Nov 2003, Coosa wrote: > Hello all, > > > > When I compile certain files within a project and get the object files after > a successful compilation I can later use the .o files and delete the > oroginal .cpp files and just inlcude the header file for the function > declarations. > > However I wish o be able to use my object files without being imposed to > create a project! > > For example: > > Suppose I created a project called project.dev and I included to my project > A.cpp, A.h and main.cpp > > Afetr compilation I've got also now A.o and main.o to my project. > > I can delete A.cpp and includde the A.o to the object files under project > options -> parameters -> linker, no problem with that. > > > > Now, I wish to use both A.h and A.o without including them to a project! > This means to put them in the default include directory under > C:\Dev-Cpp\include and under C:\Dev-Cpp\lib repectively. Then when I create > a normal source file ( not a project ) I wish to simpley include the A.h and > use the functions in it! > > When I do this get : > > [Linker error] undefined reference to `..' > > Can some one help me please how to configure such issues? > > > > Bets regards > > > > Coosa > > |