Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Linking standard libraries
Re: Linking standard libraries [message #36935 is a reply to message #36923] Tue, 24 July 2012 07:13 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

mirek wrote on Sun, 22 July 2012 18:26

I am afraid that the new code does not have the same error handling as the old one - you can quickly demonstrate that using examples/ImageView, which now does not work.

Mirek


Well, the error handling is working well. The problem seems to be that sizeof(jpeg_decompress_struct) returns different values in different files. In jpgupp.cpp it evaluates to 448 and in jdapimin.c it results to 488. The sanity checks in libjpeg catch this and throw out an error, which is quite reasonable.

I was so far not successful in finding why it happens. I suspected difference between code compiled as c++ and that compiled as plain c. Also, I checked that the jpeglib.h where the struct is defined is preprocessed the same way in both situations. Even when trying with various combinations of parameters (especially -Os/-O3), I was not able to reproduce it in a simpler testcase...

So my quest to hunt this bug down will have to continue. I just wanted to share my above findings in case someone has some idea what could be thee cause and also because it is nice example of what can go wrong when mixing C++ and C Smile

Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: U++ and MinGW 4.7 (-std=c++11) issues
Next Topic: Install script for Ubuntu
Goto Forum:
  


Current Time: Sun Jun 22 16:08:46 CEST 2025

Total time taken to generate the page: 0.04394 seconds