Results 1 to 1 of 1
Hi all!!! I have been trying to port a piece of C++ code from windows to Linux environment. I'm using redhat9 which has KDE3 and QT3.1.x on it. I used ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-13-2008 #1
- Join Date
- Sep 2007
gmake error: No rule to make target lib_file.a
I have been trying to port a piece of C++ code from windows to Linux
environment. I'm using redhat9 which has KDE3 and QT3.1.x on it.
I used KDevelop 2.1 bundled with it. I created a new C++ project with
My problem is "how to pass multiple .a files to a project"??
The code needs to import headers and .a files containing the definitions of functions contained therein. I supplied the path of the folder containing the headers as "-Ipath_of_header_folder" as a compiler flag and supplied the path of library files' folder as "-Lpath_of_lib_folder" as a linker flag. I'm trying to pass the lib file names as -llibfile1.a -llibfile2.a... It is then not able to access then entire string of files. If I remove the prefix -l from the last file, it starts throwing the error "no rule to build target" for the last file. Also, the .a files have a "lib" prefix such as libfilename.a. So I tried passing the name as -lfilename.a but this also worked in the same manner as described above. I have used -Wall compiler flag.
The code is compiling properly but when I hit make, the compiler is throwing up the following error:
gmake: *** No rule to make target `lib_file.a,', needed by `project_name'. Stop.
I supplied the libraryname along with the path as "dir_pathname/libfilename1.a dir_pathname/libfilename2.a.." in the make options. Gmake shows success but does not create the corresponding .o and binary files.
When I hit execute, it throws up a terminal window saying "./project_dir does not exist".
Another thing: though gmake shows success, it gives the following message for all the included libraries - "Nothing to do for libfilename.a"
Also, if I remove all the linker flags and stuff, gmake still shows the same success message...
Seems something is wrong with the make options but I haven't changed any of the defaults..
Kindly give it a second thought and not trash it as newbie query since I have exhausted all the possibilities except modifying the makefiles(which I don't know how to do..)