473,386 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

makefile problem

4
Hello,

I'm building a xml parser using xerces-c++ , to simplify the compilation, I've created a makefile, but I get the next error:

/tmp/ccAin6yE.o: In function `main':
main.cpp:(.text+0xac): undefined reference to `ParserXML::parse()'
collect2: ld devolvió el estado de salida 1
make: *** [main.o] Error 1

This is the makefile content:


GCC:=g++
OPTIONS:=-L/home/laura/xerces-c_2_8_0-x86-linux-gcc_3_4/lib -Wno-deprecated
INCLUDE:=-I/home/laura/xerces-c_2_8_0-x86-linux-gcc_3_4/include/
OBJETOS:=main.o ParserXML.o
SOURCES:=main.cpp ParserXML.cpp
HEADERS:=ParserXML.hpp
LIBS:=-lxerces-c

all:parser

parser:$(OBJETOS)
$(GCC) $(OPTIONS) -o parser $(OBJETOS) $(LIBS)

main.o:main.cpp $(HEADERS)
$(GCC) $(INCLUDE) main.cpp

ParserXML.o:ParserXML.cpp ParserXML.hpp
$(GCC) $(INCLUDE) ParserXML.cpp

limpiar:rm *.o

The header files are included in the corresponding .cpp and ParserXML.hpp is also included in main.cpp

Someone Knows what's the problem?
Sep 20 '07 #1
1 848
Hi,

Compile with '-c file.c' when building object files.
Sep 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Bryan Olson | last post by:
Here's the problem: Suppose we use: import socket f = some_socket.makefile() Then: f.read() is efficient, but verbose, and incorrect (or at least does not play will with others);
3
by: tmponko | last post by:
OK...I'm new to this and I'm sure I'm missing something obvious, so please be kind. I've tried several different approaches to this problem (including various if, ifeq, and case constructs), and...
1
by: Gg | last post by:
Hi, I have a project that depends on other projets. So I have a Makefile that calls Makefile of sub-projects to build the libs if needed. Once libs are built, the main Makefile link everything...
7
by: Dave | last post by:
Does anyone know of a Windows compatible command line tool that capable of parsing Microsoft's VC++ workspace/project (e.g., .dsw, .dsp, .sln, ..vcproj, etc.) files and generating an...
2
by: Juhan Voolaid | last post by:
Hello I need help with my makefile, so that when I compile my project the source code files would be separated from the object (*.o) files. So if I have: main.cpp and classes.cpp - the...
6
by: dolphin | last post by:
Hi! I am learing makefile recently.Now I have a problem. I write a very simple program just like "hello world" I write two makefile for it.One is included in another. the first is makefile...
1
by: %NAME% | last post by:
I wish to put a number of .db2 scripts in my makefile. However, some of the db2 scripts tries to revoke privileges from users that might do not have that privilege already, thus returns an error...
6
by: ahlongxp | last post by:
socket.makefile() may lose data when "connection reset by peer". and socket.recv() will never lose the data. change the "1" to "0" in the client code to see the difference. confirmed on both...
1
by: rpjanaka | last post by:
I am using an open source library called IGI_UDP for measure the available bandwidth of a link (http://www.cs.cmu.edu/%7Ehnn/igi/ ). with that library they have provided a "Makefile" which is not an...
2
by: chutsu | last post by:
I'm basically a summer student working on a program called Rivet. (http://projects.hepforge.org/rivet/) And I'm trying to port it to BOINC so that the hosts can download the BOINC client and do...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.