zhaopuming / quickfast

Automatically exported from code.google.com/p/quickfast
Other
1 stars 0 forks source link

Build a simple application on Netbeans with MinGW #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When i try to build the code below (using (GCC) 4.5.0):

#define BOOST_WINDOWS
#define BOOST_WINDOWS_API

#include <Stdio.h>
#include <boost/thread.hpp>
#include <Communication/MulticastReceiver.h>

using namespace std;

int main(int argc, char** argv) {
    std::size_t pool_size = 5;
    std::string   multicastaddress  = "127.0.0.1" ;
    std::string   listenaddress = "192.168.0.1" ;

    boost::asio::io_service io_service(pool_size);

    QuickFAST::Communication::MulticastReceiver multicastreceiver(multicastaddress,listenaddress,30000);

    return 0;
}

I receive these messages from compiler:

Using built-in specs.
g++.exe -v -D __USE_W32_SOCKETS -D _WIN32_WINNT=0x0501 -Wl,--enable-auto-import 
  -c -O2 -MMD -MP -MF build/Release/MinGW-Windows/main.o.d -o 
build/Release/MinGW-Windows/main.o main.cpp
COLLECT_GCC=c:\MinGW\bin\g++.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.0/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.0/configure 
--enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions 
--with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry 
--enable-libstdcxx-debug --enable-version-specific-runtime-libs 
--disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-D' '__USE_W32_SOCKETS' '-D' '_WIN32_WINNT=0x0501' 
'-c' '-O2' '-MMD' '-MP' '-MF' 'build/Release/MinGW-Windows/main.o.d' '-o' 
'build/Release/MinGW-Windows/main.o' '-shared-libgcc' '-mtune=i386' 
'-march=i386'
 c:/mingw/bin/../libexec/gcc/mingw32/4.5.0/cc1plus.exe -quiet -v -iprefix c:\mingw\bin\../lib/gcc/mingw32/4.5.0/ -MMD build/Release/MinGW-Windows/main.d -MF build/Release/MinGW-Windows/main.o.d -MP -MQ build/Release/MinGW-Windows/main.o -D __USE_W32_SOCKETS -D _WIN32_WINNT=0x0501 main.cpp -quiet -dumpbase main.cpp -mtune=i386 -march=i386 -auxbase-strip build/Release/MinGW-Windows/main.o -O2 -version -o C:\DOCUME~1\jacqueed\LOCALS~1\Temp\ccxroXWO.s
GNU C++ (GCC) version 4.5.0 (mingw32)
        compiled by GNU C version 4.5.0, GMP version 5.0.1, MPFR version 2.4.1, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory 
"c:\mingw\bin\../lib/gcc/mingw32/4.5.0/../../../../mingw32/include"
ignoring duplicate directory 
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.0/include/c++"
ignoring duplicate directory 
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.0/include/c++/mingw32"
ignoring duplicate directory 
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.0/include/c++/backward"
ignoring duplicate directory 
"c:/mingw/lib/gcc/mingw32/4.5.0/../../../../include"
ignoring duplicate directory "/mingw/include"
ignoring duplicate directory 
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.0/include"
ignoring duplicate directory 
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.0/include-fixed"
ignoring nonexistent directory 
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.0/../../../../mingw32/include"
ignoring duplicate directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++
 c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/mingw32
 c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/backward
 c:\mingw\bin\../lib/gcc/mingw32/4.5.0/../../../../include
 c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include
 c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include-fixed
End of search list.
GNU C++ (GCC) version 4.5.0 (mingw32)
        compiled by GNU C version 4.5.0, GMP version 5.0.1, MPFR version 2.4.1, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 639ec8dd7c9bc03705b4424f5e166212
COLLECT_GCC_OPTIONS='-v' '-D' '__USE_W32_SOCKETS' '-D' '_WIN32_WINNT=0x0501' 
'-c' '-O2' '-MMD' '-MP' '-MF' 'build/Release/MinGW-Windows/main.o.d' '-o' 
'build/Release/MinGW-Windows/main.o' '-shared-libgcc' '-mtune=i386' 
'-march=i386'
 c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/as.exe -o build/Release/MinGW-Windows/main.o C:\DOCUME~1\jacqueed\LOCALS~1\Temp\ccxroXWO.s
COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.5.0/;c:/mingw/bin/../libexec
/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/
LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.5.0/;c:/mingw/bin/../lib/gcc/;c:/
mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/lib/;c:/mingw/bin/../lib/
gcc/mingw32/4.5.0/../../../;/mingw/lib/
COLLECT_GCC_OPTIONS='-v' '-D' '__USE_W32_SOCKETS' '-D' '_WIN32_WINNT=0x0501' 
'-c' '-O2' '-MMD' '-MP' '-MF' 'build/Release/MinGW-Windows/main.o.d' '-o' 
'build/Release/MinGW-Windows/main.o' '-shared-libgcc' '-mtune=i386' 
'-march=i386'
mkdir -p dist/Release/MinGW-Windows
Using built-in specs.
COLLECT_GCC=c:\MinGW\bin\g++.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.0/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.0/configure 
--enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions 
--with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry 
--enable-libstdcxx-debug --enable-version-specific-runtime-libs 
--disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.0 (GCC) 
COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.5.0/;c:/mingw/bin/../libexec
/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/
LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.5.0/;c:/mingw/bin/../lib/gcc/;c:/
mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/lib/;c:/mingw/bin/../lib/
gcc/mingw32/4.5.0/../../../;/mingw/lib/
COLLECT_GCC_OPTIONS='-v' '-D' '__USE_W32_SOCKETS' '-D' '_WIN32_WINNT=0x0501' 
'-o' 'dist/Release/MinGW-Windows/quickfasttest.exe' '-L../../../MinGW/lib' 
'-shared-libgcc' '-g++.exe -v -D __USE_W32_SOCKETS -D _WIN32_WINNT=0x0501 
-Wl,--enable-auto-import    -o dist/Release/MinGW-Windows/quickfasttest 
build/Release/MinGW-Windows/main.o -L../../../MinGW/lib -lws2_32 -lboost_system 
-lboost_thread 
mtune=i386' '-march=i386'
 c:/mingw/bin/../libexec/gcc/mingw32/4.5.0/collect2.exe -Bdynamic -u ___register_frame_info -u ___deregister_frame_info -o dist/Release/MinGW-Windows/quickfasttest.exe c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../crt2.o c:/mingw/bin/../lib/gcc/mingw32/4.5.0/crtbegin.o -L../../../MinGW/lib -Lc:/mingw/bin/../lib/gcc/mingw32/4.5.0 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../.. -L/mingw/lib --enable-auto-import build/Release/MinGW-Windows/main.o -lws2_32 -lboost_system -lboost_thread -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/4.5.0/crtend.o
../../../MinGW/lib/libmingw32.a(tlssup.o):tlssup.c:(.tls+0x0): multiple 
definition of `_tls_used'
../../../MinGW/lib/libboost_thread.a(tss_pe.o):tss_pe.cpp:(.rdata$T+0x0): first 
defined here
build/Release/MinGW-Windows/main.o:main.cpp:(.text+0xda5): undefined reference 
to `_imp___ZN9QuickFAST13Communication11AsioServiceC1Ev'
build/Release/MinGW-Windows/main.o:main.cpp:(.text+0x130f): undefined reference 
to `_imp___ZN9QuickFAST13Communication11AsioServiceD1Ev'
build/Release/MinGW-Windows/main.o:main.cpp:(.text$_ZN9QuickFAST13Communication1
4AsynchReceiver11joinThreadsEv[QuickFAST::Communication::AsynchReceiver::joinThr
eads()]+0xe): undefined reference to 
`_imp___ZN9QuickFAST13Communication11AsioService11joinThreadsEv'
build/Release/MinGW-Windows/main.o:main.cpp:(.text$_ZN9QuickFAST13Communication1
4AsynchReceiver10runThreadsEjb[QuickFAST::Communication::AsynchReceiver::runThre
ads(unsigned int, bool)]+0x2a): undefined reference to 
`_imp___ZN9QuickFAST13Communication11AsioService10runThreadsEjb'
build/Release/MinGW-Windows/main.o:main.cpp:(.text$_ZN9QuickFAST13Communication1
4AsynchReceiver3runEv[QuickFAST::Communication::AsynchReceiver::run()]+0xe): 
undefined reference to `_imp___ZN9QuickFAST13Communication11AsioService3runEv'
build/Release/MinGW-Windows/main.o:main.cpp:(.text$_ZN9QuickFAST13Communication1
4AsynchReceiver4stopEv[QuickFAST::Communication::AsynchReceiver::stop()]+0x19): 
undefined reference to 
`_imp___ZN9QuickFAST13Communication11AsioService11stopServiceEv'
build/Release/MinGW-Windows/main.o:main.cpp:(.text$_ZN9QuickFAST13Communication1
4AsynchReceiverD2Ev[QuickFAST::Communication::AsynchReceiver::~AsynchReceiver()]
+0x1d): undefined reference to 
`_imp___ZN9QuickFAST13Communication11AsioServiceD1Ev'
build/Release/MinGW-Windows/main.o:main.cpp:(.text$_ZN9QuickFAST13Communication1
4AsynchReceiverD1Ev[QuickFAST::Communication::AsynchReceiver::~AsynchReceiver()]
+0x1d): undefined reference to 
`_imp___ZN9QuickFAST13Communication11AsioServiceD1Ev'
build/Release/MinGW-Windows/main.o:main.cpp:(.text$_ZN9QuickFAST13Communication1
4AsynchReceiverD0Ev[QuickFAST::Communication::AsynchReceiver::~AsynchReceiver()]
+0x1d): undefined reference to 
`_imp___ZN9QuickFAST13Communication11AsioServiceD1Ev'
build/Release/MinGW-Windows/main.o:main.cpp:(.text$_ZN9QuickFAST13Communication1
7MulticastReceiverD0Ev[QuickFAST::Communication::MulticastReceiver::~MulticastRe
ceiver()]+0xbf): undefined reference to 
`_imp___ZN9QuickFAST13Communication11AsioServiceD1Ev'
build/Release/MinGW-Windows/main.o:main.cpp:(.text$_ZN9QuickFAST13Communication1
7MulticastReceiverD1Ev[QuickFAST::Communication::MulticastReceiver::~MulticastRe
ceiver()]+0xc3): undefined reference tomake[2]: Leaving directory 

Original issue reported on code.google.com by braga1...@gmail.com on 22 Feb 2011 at 1:22

GoogleCodeExporter commented 9 years ago
Thanks for using QuickFAST.  Unfortunately MinGW is not a supported platform -- 
that means we do not build QuickFAST on MinGW on a regular basis.  Unless 
someone wants to sponsor the effort it would take to support this platform, all 
I can do is offer high-level suggestions.

In this case, though, I do have a suggestion.  QuickFAST expects a particular 
set of header files to be included in every build in which a QuickFAST header 
is used.  Rather than including boost threads, try:
  #include <Application/QuickFAST.h>

Let me know if that solves your problem, please.

Dale

Original comment by dale.wil...@gmail.com on 22 Feb 2011 at 2:50

GoogleCodeExporter commented 9 years ago
No response.  Closing the issue due to unsupported platform.

Original comment by dale.wil...@gmail.com on 22 Mar 2011 at 7:49