sabriallani / ticpp

Automatically exported from code.google.com/p/ticpp
0 stars 0 forks source link

compile and linking issues on cygwin #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. follow instructions in wiki for install
2. use windows gnu make
3. dont change any defaults

What is the expected output? What do you see instead?
using the follwing example program to quickly test if the linking works:

#define TIXML_USE_TICPP

#include <iostream>
#include <string>
#include "ticpp.h"

using namespace std;

int main ()
{
  cout << "Hello World!";
  ticpp::Document xmldoc;
  return 0;
}

Received a number of compilation errors using built code.  Then switched to
classes referenced by http://www.uwplatt.edu/csse/tools/visual-studio/ticpp/
and everything links in normally.

I'm sure i just didnt set certain values properly, but it was nice to be
able to just grab some classes and have it run.

Thought it might be usefull to include the edits made by RWH in a
quickstartup option.

What version of the product are you using? On what operating system?
svn checkout; windows xp prof

Please provide any additional information below.

Original issue reported on code.google.com by adamtars...@gmail.com on 29 Jul 2008 at 2:34

GoogleCodeExporter commented 8 years ago
Sorry - should have included make file:

# Makefile: build miniread which illustrates using TinyXML++ (ticpp)
#
# To update after changing any dependencies: make depend
#

.SUFFIXES: .cpp

CXXFLAGS=-g

%.o : %.cpp
    $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@

HELLO_CFILES=hello.cpp
HELLO_OBJFILES=$(HELLO_CFILES:.cpp=.o) $(TINYXML_CFILES:.cpp=.o)

LOOKUP_CFILES=lookup.cpp
LOOKUP_OBJFILES=$(LOOKUP_CFILES:.cpp=.o) $(TINYXML_CFILES:.cpp=.o)

TINYXML_CFILES=tinyxmlerror.cpp ticpp.cpp tinyxml.cpp tinyxmlparser.cpp

ALL_CFILES=$(TINYXML_CFILES) $(HELLO_CFILES) 

default:
    @echo 'Type "make hello" to make the example;'

hello: $(HELLO_OBJFILES)
    $(CXX) $(CXXFLAGS) -o hello $(HELLO_OBJFILES)

clean:
    rm -f *.o hello

depend:
    sed -n '1,/^##DEPENDENCIES##/p' <Makefile >Makefile.bak
    gcc -MM $(CXXFLAGS) $(ALL_CFILES) | cat Makefile.bak - >Makefile
    rm Makefile.bak

##DEPENDENCIES##
tinyxmlerror.o: tinyxmlerror.cpp tinyxml.h ticpprc.h
ticpp.o: ticpp.cpp ticpp.h tinyxml.h ticpprc.h
tinyxml.o: tinyxml.cpp tinyxml.h ticpprc.h
tinyxmlparser.o: tinyxmlparser.cpp tinyxml.h ticpprc.h
hello.o: hello.cpp ticpp.h tinyxml.h ticpprc.h

Original comment by adamtars...@gmail.com on 29 Jul 2008 at 2:35

GoogleCodeExporter commented 8 years ago
please post the errors
it appears that you missed "#define TIXML_USE_TICPP" prior to #include "ticpp.h"

Original comment by rjmy...@gmail.com on 29 Jul 2008 at 10:52