Coder Social home page Coder Social logo

Comments (8)

tpoechtrager avatar tpoechtrager commented on July 22, 2024 1

This works:

OSXCROSS_MP_INC=1 o64-clang++-libc++ -O3 -dynamiclib EntryExit.cpp Callback.cpp -fdelayed-template-parsing -o bibtex_label_generator.dylib -IEndNote\ SDK/RSServices  -isystem . -lboost_regex-mt -lboost_system-mt

-fdelayed-template-parsing is important, otherwise you will get:

In file included from Callback.cpp:33:
./rapidxml/rapidxml_print.hpp:115:23: error: call to function 'print_children' that is neither visible in the template definition nor found by argument-dependent lookup
                out = print_children(out, node, flags, indent);
                      ^
./rapidxml/rapidxml_print.hpp:390:26: note: in instantiation of function template specialization 'rapidxml::internal::print_node<std::__1::back_insert_iterator<std::__1::basic_string<char> >, char>' requested here
        return internal::print_node(out, &node, flags, 0);
                        ^
Callback.cpp:201:3: note: in instantiation of function template specialization 'rapidxml::print<std::__1::back_insert_iterator<std::__1::basic_string<char> >, char>' requested here
                print(back_inserter(outXML),doc,print_no_indenting);
                ^
./rapidxml/rapidxml_print.hpp:169:22: note: 'print_children' should be declared prior to the call site or in namespace 'rapidxml'
        inline OutIt print_children(OutIt out, const xml_node<Ch> *node, int flags, int indent)
                    ^
[and so on...]

from osxcross.

tpoechtrager avatar tpoechtrager commented on July 22, 2024

You must link against the libraries (-lboost-system, etc.). Also ensure you are using the right C++ standard library, boost is probably using libc++ and not libstdc++.

from osxcross.

JonnoFTW avatar JonnoFTW commented on July 22, 2024

It still won't compile, now I get:

$ o32-clang++-libc++ -O3 -dynamiclib EntryExit.cpp -o bibtex_label_generator.dylib -I/cygdrive/c/local/EndNote\ SDK/RSServices -I/cygdrive/c/local/rapidxml-1.13 \
   -lboost-system -lboost-regex
ld: library not found for -lboost-system

In cygwin I have installed all the boost libraries and I tried with o32-clang++-libc++, o32-clang++, o32-clang++-libc++, and o32-clang++-stdc++. I have all the cygwin packages installed for libboost 1.58 and libboost-devel.

from osxcross.

tpoechtrager avatar tpoechtrager commented on July 22, 2024

You must install the MacPorts packages:

$ echo "export MACOSX_DEPLOYMENT_TARGET=10.8" >> ~/.bashrc
$ echo "export OSXCROSS_MP_INC=1" >> ~/.bashrc
$ source ~/.bashrc
$ osxcross-macports install boost
$ o64-clang++-libc++ test.cpp -lboost_system-mt # boost is 64-bit!

from osxcross.

JonnoFTW avatar JonnoFTW commented on July 22, 2024

I get the same error, after successfully installing the boost libraries (and I verified that they work with the compiler with a test program).

$ o64-clang++-libc++ -O3 -dynamiclib EntryExit.cpp -o bibtex_label_generator.dylib -I/cygdrive/c/local/EndNote\ SDK/RSServices -I/cygdrive/c/local/rapidxml-1.13 -lboost_regex-mt -lboost_system-mt
Undefined symbols for architecture x86_64:
  "MyIUIServiceNotifyCallbackImp::appendTitle(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from:
      _Init in EntryExit-ce7e9b.o
  "MyIUIServiceNotifyCallbackImp::AddToToolsMenu()", referenced from:
      _Init in EntryExit-ce7e9b.o
  "MyIUIServiceNotifyCallbackImp::OnMenuItemSelected()", referenced from:
      vtable for ResearchSoft::CBaseObject<MyIUIServiceNotifyCallbackImp> in EntryExit-ce7e9b.o
  "MyIUIServiceNotifyCallbackImp::useSep(bool)", referenced from:
      _Init in EntryExit-ce7e9b.o
  "MyIUIServiceNotifyCallbackImp::MyIUIServiceNotifyCallbackImp()", referenced from:
      _Init in EntryExit-ce7e9b.o
  "MyIUIServiceNotifyCallbackImp::~MyIUIServiceNotifyCallbackImp()", referenced from:
      ResearchSoft::CBaseObject<MyIUIServiceNotifyCallbackImp>::~CBaseObject() in EntryExit-ce7e9b.o
      ResearchSoft::CBaseObject<MyIUIServiceNotifyCallbackImp>::~CBaseObject() in EntryExit-ce7e9b.o
  "typeinfo for MyIUIServiceNotifyCallbackImp", referenced from:
      typeinfo for ResearchSoft::CBaseObject<MyIUIServiceNotifyCallbackImp> in EntryExit-ce7e9b.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

If you'd like to try to compile it yourself, you can get the necessary libraries here (endnote sdk is annoying to find)

https://dl.dropboxusercontent.com/u/36575616/local.7z

from osxcross.

tpoechtrager avatar tpoechtrager commented on July 22, 2024

No reply. Closing.

from osxcross.

JonnoFTW avatar JonnoFTW commented on July 22, 2024

Sorry, I forgot about this, I don't have a mac to test on and the user I got to test the file couldn't get it working:

JonnoFTW/BibTeX-Label-Creator#2

from osxcross.

tpoechtrager avatar tpoechtrager commented on July 22, 2024

No problem! Feel free to reopen if you have any further questions.

from osxcross.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.