|
Boost : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2008-07-16 04:17:30
start with one of the demos or examples and make sure you can build
and execute it. In fact, you should run the whole test suite. Look
for library_status and library_test.sh and library_test.bat
Robert Ramey
Tiago da Silva wrote:
> Here is how I managed not to correct, but to work around my bug:
>
> [code]
>
> stringstream archbuf;
> boost::archive::text_oarchive *oa = new
> boost::archive::text_oarchive(archbuf, 3 );
>
> const structs::POINT2D aaa = {1,2,3,4};
> const structs::LIVE_CAM aaumalivec = {5, 6, 7, 8, 9};
> const structs::POINT2D_PAIR aappp = {10, 11, 12, 13, 14, 15, 16,
> 17};
>
> const string anana = "ana acaxa kkk";
>
> *oa << aaa;
> *oa << aaumalivec;
> *oa << anana;
> *oa << aappp;
>
> std::cout << "-- archive content: >" << archbuf.str() << endl;
>
> // archbuf.flush();
>
> ofstream ofs("savedProject.imag3d");
>
> ofs << archbuf.str();
>
> ofs.close();
>
> delete oa;
>
> [/code]
>
> basically, I use boost to serialize everything inside a stringbuffer,
> and then I write the whole string buffer to a file.
>
> Tiago
>
> On Wed, Jul 16, 2008 at 12:34 AM, Tiago da Silva <besbatti_at_[hidden]>
> wrote:
>
>> I tried all the combinations available, and mylibs require me to use
>> a Multithreaded DLL runtime...
>>
>> still getting the Access violation writing location when I try to
>> instantiate a
>>
>> [code]
>>
>> boost::archive::text_oarchive oa(ofs)
>>
>> [/code]
>>
>> (ofs being a ofstream)...
>>
>> one thing i noticed is that if I do this:
>>
>> [code]
>>
>> stringstream archbuf;
>> boost::archive::text_oarchive *oa = new
>> boost::archive::text_oarchive(archbuf, 3 );
>>
>> *oa << VerticesKeeper::getConst( vkeeper );
>>
>> archbuf.flush();
>> delete oa;
>>
>> [/code]
>>
>> I don't get the error, but the file is not written ( that is, the
>> archbuf.flush() has no effect at all).
>>
>> Any other ideas?
>>
>> Thanks in advance,
>>
>> Tiago
>>
>>
>>
>> On Wed, Jul 16, 2008 at 12:17 AM, Tiago da Silva <besbatti_at_[hidden]>
>> wrote:
>>
>>> Thx for answering, Joaquín.
>>>
>>> Currently I'm using a Multi-threaded Debug DLL (/MDd) runtime,
>>> without optimizations, and all of them work perfectly. No warnings.
>>>
>>> So, do you think that, by changing the runtime options, it might
>>> work?
>>>
>>> Tiago
>>>
>>>
>>> On Tue, Jul 15, 2008 at 10:58 PM, <joaquin_at_[hidden]> wrote:
>>>
>>>> Tiago da Silva escribió:
>>>>
>>>>> I am linking to the following libs in my project:
>>>>>
>>>>> glut32.lib glu32.lib opengl32.lib odbc32.lib odbccp32.lib cv.lib
>>>>> cxcore.lib
>>>>> highgui.lib
>>>>>
>>>>> basically OpenGL and OpenCV.
>>>>>
>>>>> Are there any imcompatibility issues? I simply CANNOT instantiate
>>>>> an output
>>>>> file!!!.
>>>>>
>>>>>
>>>>
>>>> Hi Tiago,
>>>>
>>>> Have you made sure that all the libs your're using, as well as the
>>>> main program, are built to work
>>>> with the same version of the C runtime library (dynamic/static,
>>>> multi/single-threaded)?
>>>>
>>>> Joaquín M López Muñoz
>>>> Telefónica, Investigación y Desarrollo
>>>> _______________________________________________
>>>> Unsubscribe & other changes:
>>>> http://lists.boost.org/mailman/listinfo.cgi/boost
>>>>
>>>
>>>
>>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk