Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageIn 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
Post Follow-up to this messageOn 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
Post Follow-up to this messageOn 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
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.