Classic/Standard iostream question ?

Hi,
I was experiencing a problem with one of our libraries lately due to the fact that a customer of ours was getting undefined symbols like the following when linking against our library and stlport4 library:
std::ostream &std::ostream::operator<<(short)
std::ostream &std::ostream::operator<<(int) etc
__rwstd::rwse_eofbit_set
[Hint: static member __rwstd::rwse_eofbit_set must be defined in the program] Now I believe the reason as to why this is happening is because our library is exposing symbols which it expects libCstd to resolve when linking but because stlport4 is being used; these symbols are not resolved.
Now we are supposed to be classic iostream compatible but I noticed by using the command dump -C library that there where many references to the std namespace (std::) in the symbol table outputted.
We build on solaris 2.7 using FORTE 60 and also on solaris 2.8 using FORTE_61 and our build line was pretty standard (i.e. we used CC -c and some includes and by default accepted compat=5 libs).
Now I have rebuilt our libraries so that all references to std:: in the symbol table are now gone. To do this i used the following C++ flags:
-compat=5 -library=iostream -library=Crun -library=no%CstdI have a few questions ?
Is the build/link flags above correct to be classic iostream compliant ?
What is sun's stand on mixing classic and standard iostreams in particular how does one use the STL library in classic mode ?
Finally - if i release the product library using classic iostream - can a customer safely link against our product library and the default compat=5 (i.e. libCstd, libCrun and STL etc) ?
Any help or pointers much appreciated ?
Cheers,
Clive

To use classic iostreams and to be sure you are not using libCstd, use the option
-library=iostream,no%Cstd
on every CC command line, compiling and linking.
The C++ Migration Guide says that you cannot mix classic iostreams and standard iostreams in the same program. Actually you can, and I'm having the document updated. But the requirements are fairly strict. But classic iostreams have been obsolete since 1998, and can be used only with extreme care in conjunciton with the standard library. I think you would be well advised not to use classic iostreams in modern C++ code.
In any event, here are the restrictions on mixing iostream versions:
1. Do not mix versions on the same stream (fstream, strstream, etc).
2. For the standard streams (cin, cout, cerr, clog), use one version consistently throughout the program. Since cin and cout are tied, reading cin using one version writing to cout using another version can cause strange program behavior.
3. Do not include classic iostream headers in a module where you include headers from the C++ Standard Library. The standard library depends for correct operation on using standard iostreams, and you could wind up trying to apply classic iostreams to standard library objects.
The likely scenario for mixing iostream versions arises from using libraries from different sources that you don't control.
Let's suppose the main program uses the standard library, and you want to link a library L that uses classic iostreams. The library should not use the standard streams (cin, cout, err, clog), should not use the C++ Standard Library, and it should communicate with the program via an interface that does not involve iostreams. That is, the main program should be able to use the library without including any classic iostream headers.
Build library L as a shared library with a dependency on ibiostream:
CC *.cc -c -Kpic -library=no%Cstd,iostream
CC -G -o L.so *.o -library=iostream,no%Cstd,Crun -lc
Build the main program without reference to libiostream, and link it to L.so.
If you use this kind of separation, you should not have any problems. If you have more mixing of streams or mixing of classic iostreams with the C++ standard library, you may run into problems. The issues are not details of the C++ implementation, but are fundamental to the design of iostreams and the C++ standard library.

Similar Messages

  • SQL 2008 R2 standard reports - question about server dashboard and what it refers to as "adhoc" queries

    So I have started looking at some of the standard reports available with SSMS and in particular, the "server dashboard".   One thing that caught my attention were the charts that referred to "adhoc" queries.  I wondered how
    those were being defined, and as I expected, they are most likely those statements not in a stored procedure.  This was answered in
    this thread.  
    On a particular server Im interested in, this % value is well over 50% and the primary applications that interact with the databases on this system are Microsoft based products such as Dynamics and another commercial application which I know uses hundreds
    of stored procedures.  Now, Im sure there are some sql statements being used, possibly "dynamic" type sql, by these applications, but would the metrics really be skewed this far?
    What these charts tell me, with the "adhoc" statement types pushing CPU and Disk I/O %  this far, is that there is a BUNCH of these statements being run against the various databases.  The disk I/O might be a bit off since I only recently
    added dozens of missing indexes, but my question is this:
    With the "adhoc" type statements taking up this much of the CPU and Disk resources, can we say that there are likely a lot of these going on ?  I suppose one way to find out is to launch profiler and listen in while there is moderate
    to heavy user activity.
    Thoughts?

    Hello,
    Adhoc queries are DML statements with not parameterization. Sometimes users use this statements, and sometimes these statements come from applications.
    Use Query #2 on the following link to identify those adhoc queries:
    http://mssqlfun.com/2013/04/08/dmv-5-queries-runing-are-adhoc-or-proc-single-or-multi-use-sys-dm_exec_cached_plans/
    Identify if those adhoc queries belong to specific users or applications.
    One of the options you have to deal with is is the following configuration option:
    sp_CONFIGURE 'show advanced options',1
    RECONFIGURE
    GO
    sp_CONFIGURE ‘optimize for ad hoc workloads’,1
    RECONFIGURE
    GO
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Standard Business Questions for new FI/CO implementation

    Hello,
        Can anybody please provide a standard lists of questions to ask Business persons for FI/CO implementation or suggest where can it be found/available. kindly send to this email : [email protected]
    Please assist in this reagard as it is very urgent.
    Points will be given generously.
    Thanks

    Hi Ashwin,
    Please Find below the some of the general questions asked for a new implementation.
    1)     Describe in as much detail as possible of the business at your location and its processes regarding
    2)     Prepare a complete list on all legally required reports, forms and templates (e.g. Financial Statement Versions Balance, P&L, Cash Flow Report, Expense Report, Reconciliation Report about Diff. US GAAP / local Tax Law, etc).
    3)     Will you need an interface to other external software? (e.g. payroll, taxes, barcode, etc.).
    Please list and give a brief explanation.
    4)     Please list all your required payment terms.
    5)     For the creation of vendor tolerance groups (price, no quantity) please give appropriate details.
    6)     For the creation of automated journal entries, please give a complete overview on the assignment of cost elements to cost centers.
    7)     As a preparation on the mapping of the chart of accounts, please prepare a complete list of all required accounts that will have to be assigned to the new number ranges, in the Global Chart of Accounts.
    8)     Is there a legal requirement for an alternative chart of accounts for your entity?
    9)     Please prepare a complete list of all the common payment methods you have in use
    10)     Please deliver a complete list of national bank indicators and codes
    11)     Will you need different payment formats for different countries? Please give an overview. 
    12)     Provide An Organisation Chart (Bring a copy with you)
    13)     Provide your Current Chart of Accounts Listing (Bring a copy with you)
    14)     Provide a list of Cost Centres
    15)     Request from the bank complete bank directory listing relevant bank information for all banks in your country.
    16)     What types of transactions are typical for each account
    17)     Approximately how many transactions are processed daily on each bank account?
    18)     Do you currently receive bank Statements in manual or electronic format? 
    19)     How do customers typically pay
    20)     Please provide a list of all the currencies you currently deal with
    21)     Prepare a sample each of the month- end / year- end closing schedule
    Please assign points if found useful
    Regards
    Genie

  • Classic Video Games Question

    Hi all,
    I'm a bit of a video game lover and recently have come across some oldies on the web I used to love. Mostly PC games like Indiana Jones adventure types....
    I'm now 100% Mac, and found a copy on Amazon of one of these games on CD for sale. Question is, will very old mac based games run on my Intel Based iMac?
    If not, does any one know/has heard of any programs or tools to run video games classics?
    thanks

    Hi djkhont,
    As someone who was recently trying to revive my old PC games, try the following utilities:
    DosBOX - An MS-DOS emulator, available free for download for many platforms (including Mac OS X Universal)
    ScummVM - Another free application to run a good chunk of the classic LucasArts games (Monkey Island, Sam & Max, Loom, etc). You mentioned Indiana Jones... don't know which Indiana Jones you found at Amazon, but check the list of supported games, I believe "Last Crusade" is in there.
    As far as playing MacOS 9 (Classic) games on an Intel Mac, I'm afraid it's not possible, as the other posters had mentioned. The Intel Macs do not support the Classic environment.
    (another reason why I will never part with my old iBook...)
    Hope this helps,
    Steve
    iMac Intel Core 2 Duo, 2.16 GHz, 2 GB RAM   Mac OS X (10.4.9)   iBook G3 366 MHz (graphite clamshell), 576 MB RAM, Mac OS X 10.3.9

  • Lync 2013 Standard backup questions

    Hello
    I need to backup our Lync 2013 Standard Edition setup.
    We have Only one server atm.
    Looking at this post for inspiration:
    http://blogs.technet.com/b/heyscriptingguy/archive/2014/06/28/weekend-scripter-basic-lync-server-2013-backup-and-restore-part-1.aspx
    As far as i can understand, i don't need to do SQL backup at all? Or am i missing the point?
    Would I be able to restore my Lync from these 3 commands:
    Export-CSConfiguratiom, Export-CSLisConfiguration and Export-CsUserData - Is that enough for a disasterrecovery?
    And a bonus question:
    When i run Export-CSLisConfiguration . The export only contains the following:
    <?xml version="1.0"?>
    <LisDatabase xmlns="urn:schema:Microsoft.Rtc.Lis.Database.2008"/>
    Is that not incomplete somehow?

    That much would get you back up and running, yes.  But it may not be a "full" restore. 
    For example, if you have persistent chat data, it wouldn't necessarily be included in there.  If you have an archiving database where all IMs are sent, that information wouldn't be in the PowerShell exports above.  If you don't have a copy of the
    certificate and private key, that's lost.
    Typically, I run my own custom version of Lasse's backup script https://gallery.technet.microsoft.com/Backup-script-for-Lync-2013-aacbb9b9
    That pulls all the data, including your file stores, SQL exports, certificates, and everything into a single folder and zips it for you.  If you back those zips up, you'll have most everything. 
    Restoring directly back into SQL isn't the recommended method, if you did need to get back up you'd want to follow standard restore procedures by using the supported PowerShell, but you'll have other avenues to restore if needed and a more complete copy
    of your data.
    The LIS export may be complete if you don't have any Lync locations defined.  You'd typically enter these for 911 purposes.
    Check out Lasse's Channel 9 video as well:
    http://channel9.msdn.com/Events/TechEd/Europe/2014/OFC-B331
    Check out his backup series docs here as well:
    http://tech.rundtomrundt.com/search/label/Backup-Lync2013
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".
    SWC Unified Communications
    This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • After restart i see flashing between  old classic symbol and question mark

    hi,
    i just shut down my g4 ibook by holding down the power button as it had frozen. when i done that i wiped the keyboard with a cloth. when it restarted i get a small symbol (a square 2-tone blue face, not sure if it's the classic 9 symbol) and a question mark flashing in the middle of my screen.
    how can i restart my machine normally please?

    Hi John,
    Flashing question mark when starting up can mean several things. One, your iBook can't locate a System Folder to boot from or the hard disk is failing.
    Try starting up while holding down the Option key. That normally would prompt the Startup Manager window where you can select your startup disk.
    If that doesn't help, ditto for Niel's suggestion.
    More help when you see a A flashing question mark appear when you start your Mac
    Carolyn

  • Considering ipod touch over ipod classic, a few questions

    Hello, I was hoping some of the current users of the iPod touch 2nd generation cna answer a few questions for me concerning the ipod touch, particularly those with an ipod classic as well.
    I have had a 160 GB iPod classic for about a year. I had to take it back to be replaced twice because of harddrive failures. After I got the last new one I was fed up and decided to sell it on ebay. I have heard there were issues with the 80 and 160 GBs and the 120 is much better. There is a software upgrade that includes using the genious feature on your ipod for the 120's that was never available for the 160's. And since they discontinued the 160's, I'm assuming there was definately something wrong with that and Apple is too proud to admit to it, so they just roll with the 120's. So with that in mind I figured I'd sell my current 160 since the worst I could do is get the better model of the classic?
    So then I started thinking, what about an iPod touch? Here are my concerns with goign with a touch over a classic...
    The WiFi would be a huge benefit. I travel a lot and often don't feel like bringing my laptop with me. So when browsing the internet, I was wondering how it worked with Hotmail? With facebook? I know youtube works, but how does it work with other sites that are heavy with Adobe FlashPlayer, like Hulu.com? Or watch news clips from CNN or other things like that.
    I use my ipod a lot in my car, and I don't think the touch screen would be very good for this to switch songs, anybody have any experience with this?
    The flash drive is very appealing to me since I had 2 classics harddrive fail, but the small size is a concern, anybody have any opinions?
    Can the touch be used in disk mode? Does it store full resolution files of photos?
    I'm not big into games, but if I had a touch I know I would start.
    Will I just get spoiled and wish it was an iPhone or something with 3G connection to the net?
    Thanks for any help!

    The 160GB Classic was essentially the 1st Generation Classic, it was replaced by the 2nd Generation 120GB Classic, which as you have pointed out has the Genius feature etc. With the exception of the most recent Shuffle, Apple always discontinues production of the previous generation, and it has nothing to do with Apple admitting to anything. I too had to go through 2 160s before the 3rd one worked correctly, it happens. Did the Classic you sold on eBay work correctly.
    Thanks to changes by Microsoft you can now use the mail app on the Touch with a hotmail account.
    There is a Facebook app in the iTunes App Store, I don't use it so I can't vouch for it but you can go to the Apps Store and read the reviews.
    There is no Flash plugin available for the Touch and it is probably going to be 2010 before one is available so no you won't be able to use Hulu.com, etc.
    It will be harder to switch songs on the Touch in your car unless you install an iPod connection kit (if your radio supports it, the will allow you to control the Touch from your radio/steering wheel/whatever.
    If you have a large iTunes library and want it always with you then you need to lean towards the Classic. If you can live with swapping things around you can go with the Touch. A big advantage to the Touch is the plethora of applications that are available on the iTunes Store, many of them free.
    You cannot currently use the Touch in disk mode (don't know if version 3.0, coming this summer will add this) and it does not store full resolution files of photos.
    I had a first generation Touch which I purchased on the same day that I bought my 160GB Classic. I sold the Touch and moved to the iPhone, you get spoiled with 3G access.

  • Emac & IPod Classic - USB2.0 questions

    Our old EMac continues to do everything we need, including charging IPod Shuffles (think these are 2nd gen - little square model that looks like the latest one that has been released, not the cigarette ligher shaped one) - this has been the most reliable, trouble-free computer. But in looking at specs to upgrade to IPod Classic for kid's Xmas, stickler seems to be with the USB2 port issue (our Emac doesn't have USB2 port), operating system etc seems all OK. If it's a charging issue, couldn't we just get an ac charger? Or is it that we wouldn't be able to download from ITunes? And what does "backward compatible" really mean for us?? Sorry if these seem dumb questions, but I'm really not clear about the USB2 port question - sometimes we get a message advising to move to USB2 port if available - but we just click OK and it's never appeared to be a problem. Thanks

    There are various methods of reverting back to a previous version of iTunes. You will find them in the iTunes section of the forum just do a search.
    One of the important parts is having the standalone installer for whatever version of iTunes 9 you want to use. So get that in hand first and then learn how to go back in time.
    Good Luck

  • Acrobat 9 Standard Install Question

    I just got Acrobat 9 Standard. I want to add it onto 6 computers in a network and 1 personal computer. Will I be able to do this or are the capabilities set up where you can only install it onto one computer?

    You can install it on as many computers as you want, but only 2 can be activated at the same time, and there's a limit on the number of deactivations.

  • Adobe Acrobat X Standard Install Question

    I purchased Adobe Acrobat X Standard with my computer from Dell.  I have the serial number.  How do I download the software??

    If its a Dell machine you have bought and the software was bundled with it you can visit the site https://smartsource.dell.com and login.
    Make sure you're running it from the Dell computer that had the license. It will install an IE activeX control to determine your system info, and then will take you to a downloads page where you can download all the software your computer was licensed for.
    Hope this helps.

  • A few standards related questions

    i've got three questions:
    http://www.accent-mg.com/agape/test
    1. what's the deal with the footer? it seems like my
    "containerwide" div isn't meeting the "footer" div correctly. but i
    don't see anything in the code that would allude to that...
    2. how do i get my rule/ornament, the one just below the
    maroon bar, (reference:
    http://www.accent-mg.com/agape
    ) below the header .png? do i use z-index?
    3. once i get this all set up in css, is using a cms like
    textpattern or expression engine much easier? i tried to use it
    with a website that utilized tables, with no success. am i going in
    the right direction in regards to xhtml setup to optimize use with
    these cmss?
    thanks a lot.

    Hi theOne
    Thanks for the reply,
    I'll take a look at the CSS but I'm not going to be modifying the wiki-server on Leopard as there seems to be little point with the next release isn't far off. I'll be putting it to use when I upgrade.
    Contacts - it's something i've thought about. The place I used to work at had Netscape Directory Server and Imperia (CMS), we managed to add a nice search feature on the intranet there which was always used. It would be great if it was easy enough to add another search button with that accessing open directory or something similar. We'll always keep the FMPro database though as I use it in conjunction with a few other DB's, so it's not a big deal. Integrating FMPro would have been handy for accessing a few of our other databases in one single place.
    You are right, you can't turn off editing on individual pages or the blog/wiki. For me it would be great, as it would allow the intranet to be more of a group experience. If the company was 10 or 20 people then it would be an easier decision to allow them all write access to it. We are just over 100 in London now and that makes it more likely someone will get too button happy with their mouse. Still we have an easy to use intranet out of this, which cost us nothing so I can't complain. If we outgrow the wiki server faster than Apple add features we're not too stuck and could move it to Wordpress or similar. I am looking forward to adding podcasting and the mailing list features in the next release.
    Thanks again all
    Beatle

  • I have a 30GB Ipod Classic with sync question

    I have not synced in quite a while. When I tried to sync this morning, I received the following message:
    "The ipod is synced with another iTunes library. Do you want to erase this ipod and sync wit this iTunes Library"?
    I see all of my music on the laptop library and all of the music ont he iPod itself, but i am concerned about what to do now.
    Please help.

    are you sure you have a 30gb ipod classic - the ipod classic is only 80gb and 160gb - if it is 30gb it must be an ipod video.
    would advise you to re-post your message in the correct forum so people can with more experience in the ipod video can help you.
    hope this helps!

  • Abap hr standard screen question

    Hi,
    I want to learn if it is possible to create a screen at which we can get datas as we get from standard screens at hr.
    I mean can we get data directly as we get by using 'get pernr' without using where condition at a infotype which we created.
    Edited by: Begum Al on Aug 11, 2008 3:50 PM

    Yes, you just need to link your program to the logical database PNP. Look at [Reporting in Human Resource Management|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/HRREPORTING/HRREPORTING.pdf] and [Report Programming in HR|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PYINT_PROGRAMM.pdf] and [Programming Utilities for the Logical Databases PNP and PAP|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PYINT_RMAC.pdf], also do some [search at sdn.sap.com|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=hr+report&cat=sdn_all]
    Regards

  • My Macintosh Classic shows blinking question mark :(

    My Mac stopped to boot It shows question mark during the start. I can boot only from MacOS 6.x sitting in ROM, by holding CMD+Option+O+X and then hard disk is normally visible. I checked that HDD - it spins correctly and I tried to boot from it on another Mac and it worked. Also, I tried to reset PRAM. Nothing helps. Any ideas?

    The tests that you have done do seem to cover all possibilities. The machine will boot from ROM, with the hard disk visible, which ought to rule out at least the most obvious hardware faults. Also, the hard drive itself and the operating system appear to be OK. A PRAM reset does not change anything.
    Do you have access to a bootable disk tools floppy with Disk First Aid and Apple HD SC Setup? If so, you could begin by checking whether the hard disk shows up in Disk First Aid (if yes, verify, and repair if needed). You may then want to run Apple HD SC Setup and update the hard disk drive driver.
    It is of course thinkable that some kind of borderline situation exists, where an electronic component is about to fail. A close examination (with a magnifying glass) of the board(s) should reveal leaking/bulging/discoloured electrolytic capacitors et cetera. At the same time, it may be a good idea to check the voltage of the (3.6 V) battery.  A warning: All work inside a compact Macintosh computer can be very dangerous because of high voltages in certain areas (even when the computer has been switched off and disconnected from the mains), and must be carried out by someone with the necessary expertise.
    Jan

  • Classic Producer/Consumer question

    All,
    I've a straightforward (hopefully) question regarding the producer consumer thread example. While I get the entire picture - I have a question about the lines in the code :
                   sleep((int)(Math.random() 100));*
    in the Producer. WITHOUT this line, the output goes haywire (with Producer and Consumers putting/getting values randomly)- while with it, the producers and consumers start behaving normally (ie Producer Puts and Consumer Gets like clockwork)
    Why is it necessary to put this line in? What's it trying to put to sleep anyways and for what reason?
    public class DerTest {
         public static void main(String...argv) throws Exception {
              Holder holder = new Holder();
              Producer producer = new Producer(holder);
              Consumer consumer = new Consumer(holder);
              producer.start();
              consumer.start();
    class Holder {
         private int i;
         private boolean hasPut;
         public synchronized void put(int i) throws Exception {
              while(this.hasPut == true) {
                   wait();
              this.i = i;
              this.hasPut = true;
              notifyAll();
         public synchronized int get() throws Exception {
              while(this.hasPut == false) {
                   wait();
              this.hasPut = false;
              notifyAll();
              return this.i;
    class Producer extends Thread {
         private Holder holder;
         public Producer(Holder holder) {
              this.holder = holder;
         public void run() {
              int i = 0;
              try {
                   while(true) {
                        this.holder.put(i);
                        System.out.println("Putting : "+i);
                        i++;
                        sleep((int)(Math.random() * 100));
              } catch(Exception e) {
                   e.printStackTrace();
    class Consumer extends Thread {
         private Holder holder;
         public Consumer(Holder holder) {
              this.holder = holder;
         public void run() {
              try {
                   while(true) {
                        int i = this.holder.get();
                        System.out.println("Getting : "+i);
              } catch(Exception e) {
                   e.printStackTrace();
    }

    because the printlns are not synchronized with the get/put calls. put those printlns inside of the get/put methods and you will see the output you expect.

Maybe you are looking for

  • How can I get a click box to interact with a text entry box on the same page?

    I'm creating a tutorial on using a specific system and trying to recreate what the end user would actual do in the system.  On one slide, the end user must enter text into a field, then press a button (click box) to advance to the next slide.  I want

  • How do I find the date of my last vault update?

    How do I find the date of my last vault update? All but one picture in a folder is missing from my library. I want to go back in Time Machine to the date/time of my last update to restore the lost images.

  • Rating Widget - Update afterRating following rateHandler

    In the rating widget I am implementing, I want to fade the stars out onclick, then fade them back in with the updated "average" value showing. I am using the rateHandler to call my fade function, and then the fade function calls another fade to handl

  • Execution time for Call Library Function Node

    I am experimenting with the Call Library Function Node block in LabVIEW and am curious if it should be running faster than what I'm seeing.  For testing purposes, I have compiled and transfered to my RT target the .out file from the KB article http:/

  • ALE using PULL Approach question

    Hello All,               Can anybody  explain me the sep-by-step process for getting the material master using BD11- PULL approach. I had already configured the Distribution model for sending the request MASFET in system B, from which we are requesti