I think these warnings, while producing a lot of annoying screen clutter, are not an issue. It should be acceptable for the compiler to ignore the dllimport declaration for an inline function. (It'd be nice to disable these warnings, if possible -- maybe use something other than -Wall.)
The other option would be to modify all headers with classes containing inline functions to not declare the entire class as dllimport, but instead use that declaration explicitly on each non-inline member function. Yuck. That's a coding job I wouldn't wish on my worst enemy. -Paul > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Mario Valle > Sent: Friday, September 01, 2006 10:29 PM > To: osg users > Subject: Re: [osg-users] Cygwin build questions: ESRIShape > plugin and Producer > > Ah Ah! > I see a lot of _declspec attribute ignored messages building > the various pieces of OSG. But the source does not contains > any, so should be something related to gcc switches. I'll investigate. > Thanks! > mario > > Michael Henheffer wrote: > > I've seen this issue with passing STL classes between DLLs in the > > past. It can usually be fixed by exporting an instantiation of the > > class when building the dll. > > > > The following article discusses the issue and shows an > example where > > this was done with the vector class. > > > > http://support.microsoft.com/default.aspx?scid=kb;en-us;168958 > > > > I hope this helps a bit. > > > > Mike > > > > > > > > Paul Martz wrote: > >> This seems to be a problem with passing copies of a std::string > >> between DLLs. getApplicationName() creates a std::string > from argv[0] > >> and returns a copy on the stack; the crash occurs at that time. > >> > >> I modified osgviewer to not use ArgumentParser at all, and > instead to > >> simply call readNodeFile( std::string( "cow.osg" )). I get > the same > >> kind of crash, and this time it occurs when the std::string > >> constructor returns. > >> > >> I wonder if it's something as simple as a missing compiler option > >> that would resolve this issue. > >> -Paul > >> > >> > >>> -----Original Message----- > >>> From: [EMAIL PROTECTED] > >>> [mailto:[EMAIL PROTECTED] On Behalf > Of Mario Valle > >>> Sent: Wednesday, August 30, 2006 10:10 AM > >>> To: osg users > >>> Subject: Re: [osg-users] Cygwin build questions: ESRIShape plugin > >>> and Producer > >>> > >>> Yes, > >>> but seems a memory corruption because no useful backtrace can be > >>> obtained. > >>> Using osgviewer dies in the > >>> arguments.getApplicationUsage()->setApplicationName(arguments. > >> getApplicationName()); > >>> line. Maybe is something related to having only Visual > Studio 6 on > >>> this machine (I cannot upgrade till I'm sure another application > >>> still compile and runs without problems). > >>> Anyway, I was so frustrated that I give up. > >>> Now I'm trying to find a machine on which I can install Visual > >>> Studio Express. And so return under Ma'a Microsoft. What's a pity. > >>> Thanks for your sympathy! > >>> mario > >>> > >>> > >>> Paul Martz wrote: > >>>> Thanks for the thorough notes. I'll try to get some time to > >>> continue > >>>> working on this, hopefully this week. > >>>> > >>>> It'd be nice to get to the bottom of why the binaries don't > >>> render for you. > >>>> Have you tried building debug and watching what happens > under gdb? > >>>> -Paul > >>>> > >>>> > >>>>> -----Original Message----- > >>>>> From: [EMAIL PROTECTED] > >>>>> [mailto:[EMAIL PROTECTED] On Behalf > Of Mario > >>>>> Valle > >>>>> Sent: Tuesday, August 29, 2006 8:59 PM > >>>>> To: osg users > >>>>> Subject: Re: [osg-users] Cygwin build questions: ESRIShape > >>> plugin and > >>>>> Producer > >>>>> > >>>>> Paul Martz wrote: > >>>>>> I've used Cygwin in the past for a few projects, and am now > >>>>> trying to > >>>>>> use it to build current OSG/OT/P CVS source. > >>>>>> > >>>>>> OT and P build fine. When I go to build OSG, it fails > to find the > >>>>>> Producer include files while building osgProducer. I found > >>>>> that I have > >>>>>> to explicitly export PRODUCER_INC_DIR and > >>> PRODUCER_LIB_DIR in order > >>>>>> for the OSG build to find the Producer header and include > >>> files. Is > >>>>>> this to be expected? (The Producer 'make install' puts > things in > >>>>>> /usr/local/Producer/include and > >>>>>> /usr/local/Producer/lib.) > >>>>>> > >>>>>> Once that issue was resolved, core OSG and some of the > >>>>> plugins built. > >>>>>> However, the build failed in the ESRIShape plugin, failing > >>>>> to compile > >>>>>> ESRIShape.cpp at line 38 because ::read was not defined. > >>>>>> > >>>>>> Any help would be appreciated. > >>>>>> -Paul > >>>>>> > >>>>>> _______________________________________________ > >>>>>> osg-users mailing list > >>>>>> [email protected] > >>>>>> http://openscenegraph.net/mailman/listinfo/osg-users > >>>>>> http://www.openscenegraph.org/ > >>>>>> > >>>>> Here are some sparse notes on building OSG under Cygwin. > >>> It builds, > >>>>> but fail at runtime and I do not understand why. Also the > >>> OT example > >>>>> WorkCrew has problems at runtime. > >>>>> > >>>>> For your question, see point 5. > >>>>> Hope you have more luck than me with Cygwn build. > >>>>> Ciao! > >>>>> mario > >>>>> > >>>>> 1) install the following packages (the full installer > ones) under > >>>>> d:/gnuwin32 > >>>>> > >>>>> freetype 2.1.10 > >>>>> jpeg 6b-4 > >>>>> libpng 1.2.8 > >>>>> libungif 4.1.4 > >>>>> tiff 3.8.2-1 > >>>>> > >>>>> > >>>>> 2) create the build file d:/buildosg.sh as below > >>>>> > >>>>> export OSG_ROOT=/cygdrive/d/OSG_OP_OT-1.1.1-rc1 > >>>>> export BSD_ROOT=/cygdrive/d/gnuwin32 > >>>>> > >>>>> export OPENTHREADS_INC_DIR=$OSG_ROOT/OpenThreads/include > >>>>> export OPENTHREADS_LIB_DIR=$OSG_ROOT/OpenThreads/lib/CYGWIN32 > >>>>> export PRODUCER_INC_DIR=$OSG_ROOT/Producer/include > >>>>> export PRODUCER_LIB_DIR=$OSG_ROOT/Producer/lib/CYGWIN32 > >>>>> export COMPILE_EXAMPLES=yes > >>>>> export COMPILE_INTROSPECTION=no > >>>>> > >>>>> export FREETYPE_INCLUDE=$BSD_ROOT/freetype/include > >>>>> export FREETYPE_LIB=$BSD_ROOT/freetype/lib > >>>>> export PATH=${PATH}:$BSD_ROOT/freetype/bin > >>>>> > >>>>> export JPEG_INCLUDE=-I$BSD_ROOT/jpeg/include > >>>>> export JPEG_LIB="-L$BSD_ROOT/jpeg/lib -ljpeg" > >>>>> > >>>>> export GIF_INCLUDE=-I$BSD_ROOT/libungif/include > >>>>> export GIF_LIB=$BSD_ROOT/libungif/lib > >>>>> > >>>>> export TIFF_INCLUDE=-I$BSD_ROOT/tiff/include > >>>>> export TIFF_LIBS=$BSD_ROOT/tiff/lib > >>>>> > >>>>> export PNG_INCLUDE=-I$BSD_ROOT/libpng/include > >>>>> export PNG_LIB=$BSD_ROOT/libpng/lib > >>>>> > >>>>> export OSG_INC_DIR=$OSG_ROOT/OpenSceneGraph/include > >>>>> export OSG_LIB_DIR=$OSG_ROOT/OpenSceneGraph/lib/CYGWIN32 > >>>>> > >>>>> make $* > >>>>> > >>>>> > >>>>> 3) build OpenThreads > >>>>> > >>>>> Seems you need to copy uname.exe from cygwin into this > >>> directory > >>>>> to have > >>>>> $(OS) correctly initialized. > >>>>> > >>>>> in pthreads_src/GNUMakefile > >>>>> remove the unneeded line 31: LIBS += -lpthread > >>>>> > >>>>> cd OpenThreads > >>>>> make > >>>>> > >>>>> > >>>>> 4) build Producer > >>>>> > >>>>> cd ../Producer > >>>>> d:/buildosg.sh > >>>>> > >>>>> > >>>>> 5) Edited > >>>>> $OSG_ROOT\OpenSceneGraph\src\osgPlugins\ESRIShape\ESRIShape.cpp > >>>>> > >>>>> #if defined(_MSC_VER) || defined(__MINGW32__) || defined(WIN32) > >>>>> #include <io.h> > >>>>> extern "C" int read(int, void *, unsigned int); #endif > >>>>> > >>>>> > >>>>> 6) Under the installed freetype > >>>>> edit bin/freetype-config > >>>>> > >>>>> verify that line 12 read as the following (no > D:/gnuwin32.... it > >>>>> confound dependency tracking) > >>> prefix=/cygdrive/d/gnuwin32/freetype > >>>>> around line 144 edit the line to read > >>>>> libs="-L$libdir -lfreetype -lz -Wl,-s -liberty -lintl -liconv > >>>>> -lwsock32 -lole32 -luuid -lmsvcp60 " > >>>>> > >>>>> > >>>>> 4) For the jpeg plugin > >>>>> edit $OSG_ROOT\OpenSceneGraph\src\osgPlugins\jpeg\GNUMakefile > >>>>> and change > >>>>> JPEG_LIBS to JPEG_LIB > >>>>> (the former for some reason is not overriden by the script > >>>>> definition) > >>>>> > >>>>> > >>>>> 5) For the gif plugin > >>>>> edit GNUmakefile > >>>>> > >>>>> ifeq ($(OS),HP-UX) > >>>>> INC += $(GIF_INCLUDE) > >>>>> else > >>>>> INC += $(GIF_INCLUDE) > >>>>> > >>>>> LINKARGS += -L$(GIF_LIB) > >>>>> endif > >>>>> > >>>>> > >>>>> 6) For the tiff plugin > >>>>> edit GNUMakefile > >>>>> ifeq ($(OS),HP-UX) > >>>>> INC += $(TIFF_INCLUDE) > >>>>> else > >>>>> INC += $(TIFF_INCLUDE) > >>>>> #LDFLAGS += -L$(TIFF_LIBS) > >>>>> LINKARGS += -L$(TIFF_LIBS) $(JPEG_LIB) > >>>>> > >>>>> endif > >>>>> > >>>>> > >>>>> 7) For the png plugin > >>>>> edit GNUMakefile > >>>>> ifneq ($(OS),HP-UX) > >>>>> INC += $(PNG_INCLUDE) > >>>>> > >>>>> LINKARGS += -L$(PNG_LIB) > >>>>> else > >>>>> INC += $(PNG_INCLUDE) > >>>>> endif > >>>>> > >>>>> > >>>>> 8) build OpenSceneGraph > >>>>> cd OpenSceneGraph > >>>>> d:/buildosg.sh > >>>>> > >>>>> I had some "modification time is in the future" warning, so I > >>>>> repeated the build procedure twice > >>>>> > >>>>> > >>>>> x) to build the Producer examples define two new variables > >>>>> (OSG_INC_DIR and OSG_LIB_DIR) and modify the GNUMakefile for > >>>>> Trackball > >>>>> > >>>>> LIBS = \ > >>>>> -L$(OSG_LIB_DIR) -losgProducer -losgDB -losgGA -losgText > >>>>> -losgUtil -losg \ > >>>>> -lProducer -lOpenThreads > >>>>> > >>>>> INC += -I$(OSG_INC_DIR) > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> Ing. Mario Valle > >>>>> Visualization Group | > >>>>> http://www.cscs.ch/~mvalle > >>>>> Swiss National Supercomputing Centre (CSCS) | Tel: > +41 (91) > >>>>> 610.82.60 > >>>>> v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax: +41 > >>>>> (91) 610.82.82 > >>>>> > >>>>> _______________________________________________ > >>>>> osg-users mailing list > >>>>> [email protected] > >>>>> http://openscenegraph.net/mailman/listinfo/osg-users > >>>>> http://www.openscenegraph.org/ > >>>> _______________________________________________ > >>>> osg-users mailing list > >>>> [email protected] > >>>> http://openscenegraph.net/mailman/listinfo/osg-users > >>>> http://www.openscenegraph.org/ > >>>> > >>> -- > >>> Ing. Mario Valle > >>> Visualization Group | > >>> http://www.cscs.ch/~mvalle > >>> Swiss National Supercomputing Centre (CSCS) | Tel: +41 (91) > >>> 610.82.60 > >>> v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax: +41 (91) > >>> 610.82.82 _______________________________________________ > >>> osg-users mailing list > >>> [email protected] > >>> http://openscenegraph.net/mailman/listinfo/osg-users > >>> http://www.openscenegraph.org/ > >> > >> _______________________________________________ > >> osg-users mailing list > >> [email protected] > >> http://openscenegraph.net/mailman/listinfo/osg-users > >> http://www.openscenegraph.org/ > > _______________________________________________ > > osg-users mailing list > > [email protected] > > http://openscenegraph.net/mailman/listinfo/osg-users > > http://www.openscenegraph.org/ > > > -- > Ing. Mario Valle > Visualization Group | > http://www.cscs.ch/~mvalle > Swiss National Supercomputing Centre (CSCS) | Tel: +41 > (91) 610.82.60 > v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax: +41 > (91) 610.82.82 > > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
