0

EDIT: this is different ffrom the other similar question because I've checked the ways they suggest a different compiler was used for the libraries, and none of the ways appear to be what's happening here

I'm trying to build an application that uses both boost libraries and wxwidgets. I've compiled both of the libraries statically using MinGW, that appears to have gone successfully, although I got a lot of warnings on the boost compile, example:

./boost/concept/assert.hpp:44:5: note: in expansion of macro 'BOOST_CONCEPT_ASSERT_FN'
     BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
     ^
./boost/concept_check.hpp:800:11: note: in expansion of macro 'BOOST_CONCEPT_ASSERT'
           BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::iterator>));
           ^
./boost/concept/detail/general.hpp:71:20: warning: typedef 'boost_concept_check801' locally defined but not used [-Wunused-local-typedefs]
       BOOST_PP_CAT(boost_concept_check,__LINE__)
                    ^
./boost/preprocessor/cat.hpp:29:34: note: in definition of macro 'BOOST_PP_CAT_I'
 #    define BOOST_PP_CAT_I(a, b) a ## b

The problem though is that when I compile my application in codeblocks, I get the error from the title.

Google suggests this problem is caused by either one of the libraries I am using, or my application, to have been compiled with a different compiler. I am certain they are all using mingw though, boost has option toolset=gcc set, wxwidgets uses mingw32-makefile, and codeblocks is set up to use the only mingw/bin folder I have on my system.

What I'm not sure is it makes a difference on what exact compilers within mingw are used, would it be a problem if boost was done with gcc, while wxwidgets was done with g++?

Here's my compiler output from codeblocks, there's quite a few other errors and warnings, the title error was just the top error: http://pastebin.com/PbRXtecg

What can I do about this? Thanks!

GemmaB89
  • 165
  • 2
  • 16
  • possible duplicate of [undefined reference to \`\_\_gxx\_personality\_sj0](http://stackoverflow.com/questions/7751640/undefined-reference-to-gxx-personality-sj0) – VP. Jun 24 '15 at 11:32
  • I've looked at that, the answers are that the user was using different compilers, but I'm using the same compiler. – GemmaB89 Jun 24 '15 at 11:34
  • 1
    @GemmaB89 either you're not using the same compiler for everything, or you're not linking in `libgcc[_s]`. I put my money on the former. – rubenvb Jun 24 '15 at 11:35
  • Also try not to use an IDE because it may do something. And, one more "also" - did you read [this](https://forums.wxwidgets.org/viewtopic.php?t=25264)? Here are the errors you have. 3rd link on google tho. – VP. Jun 24 '15 at 11:38
  • @rubenvb - does it matter between gcc and g++? I think boost uses gcc, but I can't see a way of changing that. I tried changing to toolset=g++ but it just throws an error. How would i link libgcc[_s]? – GemmaB89 Jun 24 '15 at 11:38
  • Am trying to run compile command in console, strangely the ide seems to be running 2 compile funcitons when i click build, which i'd not seen before, am looking into that. – GemmaB89 Jun 24 '15 at 11:46
  • @victor, the othe rlink on google, i looked at but again refers to using a different compiler, I only have the one version of mingw on my system – GemmaB89 Jun 24 '15 at 11:46
  • @GemmaB89 The boost build should use the toolchain on your PATH at build time. Did you build Boost yourself or download it from somewhere? Linking `libgcc[_s]` should be automatic if the linker is invoked by `g++`. Try running the last command in your output (the one starting with `mingw32-g++.exe -o bin\Debug\sendd.exe` and ending in `-mwindows`) manually, and add `-v` right after `mingw32-g++.exe`. Just to make sure, what is the complete name of the `libgcc....dll` file in the directory `F:/plus/mingw/bin/`? – rubenvb Jun 24 '15 at 12:27
  • "toolchain" is all the stuff in the mingw/bin folder? I have that set in my %path% var and I built the boost libraries using "b2 toolset=gcc ...". That would use the stuff in f:\plus\mingw\bin, wouldn't it? This is the output of adding -v to that build command: http://pastebin.com/Jc774Wn1 . It's libgcc_s_dw2-1.dll. – GemmaB89 Jun 24 '15 at 20:48

0 Answers0