Sponsored Content
Top Forums Programming std::cout and gfortran print*, don't output to the screen Post 302508939 by LMHmedchem on Tuesday 29th of March 2011 12:40:40 PM
Old 03-29-2011
The problem is particularly odd because the program compiles, links, runs, and gives the correct output, it just doesn't print to the screen. That would rule out control never reaching the print statement and such.

I was trying to debug a difference in output between the windows and linux versions, but I was able to correct that by compiling the linux under gcc3.4 instead of 4.1. Changes to the gcc header files are what "...causeth my head to ache", among other things. So now the app works properly when compiled under linux, but I still can't get anything to print to the screen??? I thought I would try to run that down, since I am sure I will need to be able to do it.

I will try to duplicate the situation in a smaller piece of code I can post. The parent main is in cpp, which forks a cpp child, that calls fortran functions, which in turn call cpp functions, so tracking things down can be a bit dodgy. I am also trying to get a hold of the person who wrote that part of the code, so I will post back if he has anything to add.

LMHmedchem
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to redirect std out and std err to same file

Hi I want both standard output and standard error of my command cmd to go to the same file log.txt. please let me know the best commandline to do this. Thanks (2 Replies)
Discussion started by: 0ktalmagik
2 Replies

2. Programming

Why I don't get any output?

Hello, I am very new in writing low level programming in C. I am trying to get an output in Linux 2.6.17.6 gentoo platform, but I don't get any output. I am trying to do the following: I am trying to scan a word and print its content at the standard output by using sscanf and printf. I... (6 Replies)
Discussion started by: Sharmin
6 Replies

3. Programming

Sun Studio C++ - Getting error in linking std::ostream &std::ostream::operator<<(std:

Hello all Im using CC: Sun C++ 5.6 2004/07/15 and using the -library=stlport4 when linkning im getting The fallowing error : Undefined first referenced symbol in file std::ostream &std::ostream::operator<<(std::ios_base&(*)(std::ios_base&))... (0 Replies)
Discussion started by: umen
0 Replies

4. Shell Programming and Scripting

awk to compare lines of two files and print output on screen

hey guys, I have two files both with two columns, I have already created an awk code to ignore certain lines (e.g lines that start with 963) as they wou ld begin with a certain string, however, the rest I have added together and calculated the average. At the moment the code also displays... (3 Replies)
Discussion started by: chlfc
3 Replies

5. UNIX for Dummies Questions & Answers

cout doesn't print everything

Hi all, I implemented a C++ program and successfully compiled and ran on my laptop. However when I copy my code to another machine (school's sun machine), it didn't run properly. I can compile and run, but cout does not print everything. I used cout in a loop where it iterates no more than 20... (5 Replies)
Discussion started by: SaTYR
5 Replies

6. AIX

Redirecting Both to a file and std output

Hello Friends, Can some one help me how to redirect output of a file to both a file and std output? All the help would be greatly appreciated. Regards Sridhar (1 Reply)
Discussion started by: send2sridhar
1 Replies

7. UNIX for Advanced & Expert Users

redirect to both file and std output at the same time

hello can some one please help me to redirect the output of a command to both std output and a file. this is little urgent. sridhar (2 Replies)
Discussion started by: send2sridhar
2 Replies

8. UNIX for Dummies Questions & Answers

how to print script output to screen and file

Hi all, I have a script that bulk loads thousands of lines of data. I need to log the output during the execution of the script. I know I can redirect (">") the output to a file; however, I want the output going to both the screen and the log file. I thought I could use pipe to pipe the... (10 Replies)
Discussion started by: orahi001
10 Replies

9. Solaris

Camouflage STD IN on output (TRU64)

Hi guys, i have a new problem, even in scripting on KSH. Given a string by standard INPUT (keyboard), i need to replace each character i print with this one '#' . It's to camouflage password while digiting on command line. For example: ---------------------------------- prompt$ ... (3 Replies)
Discussion started by: D4vid
3 Replies

10. UNIX for Dummies Questions & Answers

awk: don't print sub-arrays

Hi ! I have this input: 12{11}{11110}{80}3456 {123}15{60}9876{8083}34 I try to work on individual numbers between braces. 3 possible cases (here I used colours to be clearer only): - there is no "0" among the characters between braces: so we don't touch anything. - there is a "0" among... (4 Replies)
Discussion started by: beca123456
4 Replies
PCC(1)							      General Commands Manual							    PCC(1)

NAME
pcc - APE C compiler driver SYNOPSIS
pcc [ option ... ] [ name ... ] DESCRIPTION
Pcc compiles and loads C programs, using APE (ANSI C/POSIX) include files and libraries. Named files ending with .c are preprocessed with cpp(1), then compiled with one of the compilers described in 2c(1), as specified by the environment variable $objtype. The object files are then loaded using one of the loaders described in 2l(1). The options are: -o out Place loader output in file out instead of the default 2.out, v.out, etc. -P Omit the compilation and loading phases; leave the result of preprocessing name.c in name.i. -c Omit the loading phase. -p Insert profiling code into the executable output. -w Print compiler warning messages. -B Don't complain about functions used without ANSI function prototypes. -v Echo the preprocessing, compiling, and loading commands before they are executed. -Dname=def -Dname Define the name to the preprocessor, as if by If no definition is given, the name is defined as -Uname Undefine the name to the preprocessor, as if by -Idir files whose names do not begin with are always sought first in the directory of the file argument, then in directories named in -I options, then in /$objtype/include/ape. -N Don't optimize compiled code. -S Print an assembly language version of the object code on standard output. -a Instead of compiling, print on standard output acid functions (see acid(1)) for examining structures declared in the source files. -aa Like -a except that functions for structures declared in included header files are omitted. The APE environment contains all of the include files and library routines specified in the ANSI C standard (X3.159-1989), as well as those specified in the IEEE Portable Operating System Interface standard (POSIX, 1003.1-1990, ISO 9945-1). In order to access the POSIX rou- tines, source programs should define the preprocessor constant _POSIX_SOURCE. FILES
/sys/include/ape directory for machine-independent #include files. /$objtype/include/ape directory for machine-dependent #include files. /$objtype/lib/ape/libap.a ANSI C/POSIX library. SEE ALSO
cpp(1), 2c(1), 2a(1), 2l(1), mk(1), nm(1), acid(1), db(1), prof(1) Howard Trickey, ``APE -- The ANSI/POSIX Environment'' SOURCE
/sys/src/cmd/pcc.c BUGS
The locale manipulation functions are minimal. Signal functions and terminal characteristic handlers are only minimally implemented. Link always fails, because Plan 9 doesn't support multiple links to a file. The functions related to setting effective user and group ids can- not be implemented because the concept doesn't exist in Plan 9. PCC(1)
All times are GMT -4. The time now is 11:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy