PeekApp

PeekApp

I am trying to add the PeekApp module to a Quickwin program in order to simulate a console buffer to accept unsolicited input.

After I cut/paste the PeekApp code and include the USE PEEKAPPMODULE declaration in my Quickwin main program, I get lots of the following when I compile:
Error: The same named entity from different modules and/or program units cannot be referenced.

Does this have to do with duplicate import libraries in the module and main program?

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

A little more information about what I'm doing. I have a Quickwin main program where I spawn a hidden Fortran console application (using CreateProcess) and use a pair of anonymous pipes to communicate between the console's stdin/stdout and a Quickwin child window. I'm trying to USE the PeekApp module (see the link above for the source code) in my Quickwin main program.

Is there something I'm missing to get this multithreaded Quickwin program to compile? Are any special project settings or import libraries needed?

The error message names an identifier, or points to it. What is it? Is this name declared in any of your sources? The error message is straightforward, you can't have a symbol, say, FOO, declared in modules A and B, USE A and B and then reference FOO, since the reference is ambiguous. The usual solution is to use ONLY or renames clauses on one or more of your USE statements.

Steve

Retired 12/31/2016

The message is always something like this:

Error: The same named entity from different modules and/or program units cannot be referenced. [CREATEPROCESS]
or
Error: The same named entity from different modules and/or program units cannot be referenced. [CLOSEHANDLE]
or
the same message but with another statement, typically one that uses kernel32.

My program compiles without error when I comment out the USE PEEKAPP statement in the main program. Once I include USE PEEKAPP the error messages occur.

The variable names are not the same in the main program as are in the PeekApp module, e.g. my handle names don't match variables declared in PeekApp.

Steve,

USE PeekAppModule, ONLY: functions needed

worked for me.

Thanks!

Leave a Comment

Please sign in to add a comment. Not a member? Join today