I've recently been trying to port some SystemC code that I've been
writing from g++ to MSVC. While most of my code is working fine, I am
getting one strange behavior that I cannot explain. I've boiled a more
complicated program that shows the behavior down to the trivial hello
world-style example that follows:
#include <fstream>
#include <iostream>
#include "systemc.h"
sc_clock sysClock;
void main() {
cout << "Hello, world!" << endl;
// exit(0);
}
When compiled as-is and run, it prints out the message, and then
follows it with a diagnostic message stating "File size limit
exceeded." When the exit() statement is uncommented (or a return from
main is used), the message does not appear. I cannot determine what
the source of this message is, nor how to avoid it in the general
case. Compiling and running the same code under g++ works fine.
My compilation command lines are shown below. Creating the .exe using
one of the example .dsw files provided with the release (swapping my
source for the examples) produces a slightly different message, but
similarly confusing:
Stopped (user) (core dumped)
Does anyone know what's causing either of these messages?
Thanks,
-Brad
$ cl /GX /GR hello.cpp /I../../third-party/systemc-2.0.1/src
../../third-party/systemc-2.0.1/msvc60
/systemc/Debug/systemc.lib /link /nodefaultlib:libcd
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
hello.cpp
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/out:hello.exe
/nodefaultlib:libcd
hello.obj
../../third-party/systemc-2.0.1/msvc60/systemc/Debug/systemc.lib
_______________________________________________
Systemc-forum mailing list
Systemc-forum@xxxxxxxxxxxxxxxxxxx
https://server2.systemc.org/mailman/listinfo/systemc-forum