Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

unresolved external symbol
Hello everyone,
I get the mistake unresolved external symbol -LNK2001 when building a
solution,
but I checked over and over, but I wrote the correct name when calling
my routine, in code it looks like this:

i got my module:
module a
contains
subroutine init_global()
!
!  Initializes global constants.
!
implicit none

![c] Initialize prog%
prog%title   =3D "Vedyn"    ; prog%source  =3D ""
etc..

end subroutine init_global

and calling from the program part looks like this:

call init_global()

What=B4s wrong with that? I just don=B4t get it..

thx,
Iso

Report this thread to moderator Post Follow-up to this message
Old Post
Isomorphismus
04-03-08 12:43 AM


Re: unresolved external symbol
In your main program do you have a USE A ?
Does your link path contain the path to module a ?
Les


"Isomorphismus" <nataliehapp@hotmail.com> wrote in message
news:34239b0d-8912-4728-b200-bcfbbe5fac12@s19g2000prg.googlegroups.com...
Hello everyone,
I get the mistake unresolved external symbol -LNK2001 when building a
solution,
but I checked over and over, but I wrote the correct name when calling
my routine, in code it looks like this:

i got my module:
module a
contains
subroutine init_global()
!
!  Initializes global constants.
!
implicit none

![c] Initialize prog%
prog%title   = "Vedyn"    ; prog%source  = ""
etc..

end subroutine init_global

and calling from the program part looks like this:

call init_global()

Whatīs wrong with that? I just donīt get it..

thx,
Iso



Report this thread to moderator Post Follow-up to this message
Old Post
Les
04-03-08 12:43 AM


Re: unresolved external symbol
On Wed, 2 Apr 2008 09:21:52 -0700 (PDT), Isomorphismus
<nataliehapp@hotmail.com> wrote:

>Hello everyone,
>I get the mistake unresolved external symbol -LNK2001 when building a
>solution,
>but I checked over and over, but I wrote the correct name when calling
>my routine, in code it looks like this:

In addition to USE A, you must also link in the object file created when
module A was compiled.  This is automatic when you build in Visual Studio
(since you say LNK2001 I know you are using MS tools), but if you are buildi
ng
from the command line you might have forgotten to do that.


--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
http://softwareforums.intel.com/
Intel Fortran Support
http://support.intel.com/support/pe...cetools/fortran
My Fortran blog
http://www.intel.com/software/drfortran

Report this thread to moderator Post Follow-up to this message
Old Post
Steve Lionel
04-03-08 12:43 AM


Re: unresolved external symbol
On 2 Apr., 19:41, Steve Lionel <Steve.Lio...@intel.invalid> wrote:
> On Wed, 2 Apr 2008 09:21:52 -0700 (PDT), Isomorphismus
>
> <natalieh...@hotmail.com> wrote: 
>
> In addition to USE A, you must also link in the object file created when
> module A was compiled. =A0This is automatic when you build in Visual Studi=[/color
]
o
> (since you say LNK2001 I know you are using MS tools), but if you are buil=[/color
]
ding
> from the command line you might have forgotten to do that.
>

well, actually I use 2 modules in my program and the other one linked
perfectly (i got the use - statement and I builded in the visual
studio, so it should have linked). i solved the problem now by putting
the routine init_global into the other module, and now it runs, but it
=B4s kind of strange, isn=B4t it?

Thanks for your help,
greetings,
Iso

Report this thread to moderator Post Follow-up to this message
Old Post
Isomorphismus
04-03-08 11:27 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Fortran archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 02:23 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.