Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

PeekApp

richpauir
ビギナー
1,423件の閲覧回数
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?
0 件の賞賛
5 返答(返信)
richpauir
ビギナー
1,423件の閲覧回数
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?
Steven_L_Intel1
従業員
1,423件の閲覧回数
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
richpauir
ビギナー
1,423件の閲覧回数
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.

richpauir
ビギナー
1,423件の閲覧回数
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.
richpauir
ビギナー
1,423件の閲覧回数
Steve,

USE PeekAppModule, ONLY: functions needed

worked for me.

Thanks!
返信