Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Linking error

Dalziel__Stuart
Beginner
430 Views
A strange little bug with v6.6: when using loc(..) to get an integer pointer to a Windows function (e.g. DefWindowProc), then a link error message is generated unless the function is also referred to directly in that module.

For example, the code

program Bug
use DFWin
integer (4) ret
! ret = DefWindowProc(0,0,0,0)
ret = loc(DefWindowProc)
end

generates the messages

Compiling Fortran...
S:UsersStuartTESTBugug.for
Linking...
bug.obj : error LNK2001: unresolved external symbol _DefWindowProcA
Debug/Bug.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Bug.exe - 2 error(s), 0 warning(s)

By simply uncommenting the line "ret = DefWindowProc(...)", things work fine!

Stuart.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
430 Views
Please send this to vf-support@compaq.com so that it gets tracked and fixed.

Steve
0 Kudos
Reply