Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > The Linux Kernel
Reload this Page gmake error: No rule to make target lib_file.a
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

The Linux Kernel Compiling, theory, programming or other discussion about the linux kernel

Reply
 
Thread Tools Display Modes
Old 05-13-2008   #1 (permalink)
chaos buddha
Just Joined!
 
Join Date: Sep 2007
Posts: 3
Unhappy gmake error: No rule to make target lib_file.a

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 KDevelop 2.1 bundled with it. I created a new C++ project with
KDevelop.

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[3]: *** 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..)
Please Help!!!
chaos buddha is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 05:23 AM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0