- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have a problem in using module. I have a simple module defined as
module BasicConstants
real*8 :: pi=3.141592653589793d0
end module BasicConstants
and I tried to use parameter pi in another subroutine
subroutine read_postscript_input
use BasicConstants
....
psview%psi=psview%psi/180*pi
.....
end subroutine read_postscript_input
and i get following error message at compiling
"/out:..\\exe_release\\ps.dll" "..\\exe_release\\cover_ps.lib" "..\\exe_release\\toolbox.lib" /dll "..\\exe_release\\ps.obj"
Creating library ..\\exe_release\\ps.lib and object ..\\exe_release\\ps.exp
ps.obj : error LNK2001: unresolved external symbol _BASICCONSTANTS_mp_PI
..\\exe_release\\ps.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : U1077: 'link' : return code '0x460'
Stop.
Could someone help me out here?
I must have missed some simple things.
Thx,
Jin Li
module BasicConstants
real*8 :: pi=3.141592653589793d0
end module BasicConstants
and I tried to use parameter pi in another subroutine
subroutine read_postscript_input
use BasicConstants
....
psview%psi=psview%psi/180*pi
.....
end subroutine read_postscript_input
and i get following error message at compiling
"/out:..\\exe_release\\ps.dll" "..\\exe_release\\cover_ps.lib" "..\\exe_release\\toolbox.lib" /dll "..\\exe_release\\ps.obj"
Creating library ..\\exe_release\\ps.lib and object ..\\exe_release\\ps.exp
ps.obj : error LNK2001: unresolved external symbol _BASICCONSTANTS_mp_PI
..\\exe_release\\ps.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : U1077: 'link' : return code '0x460'
Stop.
Could someone help me out here?
I must have missed some simple things.
Thx,
Jin Li
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since you're using NMAKE, I assume you wrote your own makefile. You must also link in the .obj created by the compilation of module BasicConstants.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page