Please wait...
×

Error



Posted 14 years ago by Søren Erbs Poulsen
Hi WASY,

I have an existing 32 bit IFM module that works as intended on Windows XP 32 bit. Due to a recent upgrade in hardware I now need to compile the module for FEFLOW 64 bit using Windows 7 64 bit Enterprise. To do so I use Microsoft VC++ 2010 Professional. I have changed the neccesary settings/options/preferences so that the compiler is set to x64 in accordance with the pdf IFM example guide (which appears to very obsolete). I even created a new module in FEFLOW 64 bit so that I could simple copy-paste the code from the original module into the new source file (the part of the code written by me - not the code generated automatically by FEFLOW on module creation). 

This however does not work.

I get the following errors when compiling:

1>------ Rebuild All started: Project: ifm, Configuration: Debug X64 ------
1>Build started 21-02-2011 11:43:47.
1>_PrepareForClean:
1>  Deleting file "X64\Debug\ifm.lastbuildstate".
1>InitializeBuildStatus:
1>  Creating "X64\Debug\ifm.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1>  ifc_pch.c
1>  ifc_alloc.c
1>  ifc_amr.c
1>  ifc_archive.c
1>  ifc_assert.c
1>  ifc_bc.c
1>  ifc_bcc.c
1>  ifc_bhe.c
1>  ifc_budg.c
1>  ifc_compat.c
1>  ifc_content.c
1>  ifc_ctrl.c
1>  ifc_diagram.c
1>  ifc_file.c
1>  ifc_fracs.c
1>  ifc_graphic.c
1>  ifc_grp.c
1>  ifc_mat.c
1>  ifc_module.c
1>  ifc_obs.c
1>  ifc_power.c
1>  ifc_profile.c
1>  ifc_refdistr.c
1>  ifc_regio.c
1>  ifc_res.c
1>  ifc_strings.c
1>  ifc_time.c
1>  ifc_topo.c
1>  ifc_win32.c
1>  ifc_xdk.c
1>Lib:
1>  ifm.vcxproj -> C:\Users\Public\Documents\WASY FEFLOW 6.0\sdk\ifm\lib\vc10\X64\Debug\ifm.lib
1>FinalizeBuildStatus:
1>  Deleting file "X64\Debug\ifm.unsuccessfulbuild".
1>  Touching "X64\Debug\ifm.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:01.26
2>------ Rebuild All started: Project: TVBC, Configuration: Debug x64 ------
2>Build started 21-02-2011 11:43:49.
2>_PrepareForClean:
2>  Deleting file "x64\Debug\TVBC.lastbuildstate".
2>InitializeBuildStatus:
2>  Touching "x64\Debug\TVBC.unsuccessfulbuild".
2>ClCompile:
2>  TVBC.cpp
2>Link:
2>    Creating library C:\Users\SEP\Documents\FEFLOW IFM Projects\TVBC\x64\Debug\TVBC.lib and object C:\Users\SEP\Documents\FEFLOW IFM Projects\TVBC\x64\Debug\TVBC.exp
2>TVBC.obj : error LNK2019: unresolved external symbol IfmRegisterProc referenced in function RegisterModule
2>TVBC.obj : error LNK2019: unresolved external symbol IfmSetPrimarySource referenced in function RegisterModule
2>TVBC.obj : error LNK2019: unresolved external symbol IfmSetHtmlPage referenced in function RegisterModule
2>TVBC.obj : error LNK2019: unresolved external symbol IfmSetCopyrightPath referenced in function RegisterModule
2>TVBC.obj : error LNK2019: unresolved external symbol IfmSetDescriptionString referenced in function RegisterModule
2>TVBC.obj : error LNK2019: unresolved external symbol IfmRegisterModule referenced in function RegisterModule
2>TVBC.obj : error LNK2019: unresolved external symbol IfmModuleVersion referenced in function RegisterModule
2>TVBC.obj : error LNK2019: unresolved external symbol IfmGetBorderNode referenced in function "void __cdecl OnEditDocument(struct IfmModuleStruct *,struct _WidgetRec *)" (?OnEditDocument@@YAXPEAUIfmModuleStruct@@PEAU_WidgetRec@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmInfo referenced in function "void __cdecl OnEditDocument(struct IfmModuleStruct *,struct _WidgetRec *)" (?OnEditDocument@@YAXPEAUIfmModuleStruct@@PEAU_WidgetRec@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmGetNumberOfBorderNodes referenced in function "void __cdecl OnEditDocument(struct IfmModuleStruct *,struct _WidgetRec *)" (?OnEditDocument@@YAXPEAUIfmModuleStruct@@PEAU_WidgetRec@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmGetResultsFlowHeadValue referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmSetBccFlowTypeAndValueAtCurrentTime referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmGetResultsYVelocityValue referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmGetResultsXVelocityValue referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmGetBccFlowType referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmGetBcFlowType referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmSetBcMassTypeAndValueAtCurrentTime referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmSetBcFlowTypeAndValueAtCurrentTime referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmGetY referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmGetX referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmGetCurrentTimeIncrement referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>TVBC.obj : error LNK2019: unresolved external symbol IfmGetAbsoluteSimulationTime referenced in function "void __cdecl PreTimeStep(struct IfmModuleStruct *)" (?PreTimeStep@@YAXPEAUIfmModuleStruct@@@Z)
2>C:\Users\SEP\Documents\FEFLOW IFM Projects\TVBC\x64\Debug\TVBC.dll : fatal error LNK1120: 22 unresolved externals
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:00.79
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

I can't seem to find a guide on how to set this up in VC++ 2010 allthough one is mentioned here http://www.feflow.info/html/help/default.htm?turl=HTMLDocuments%2Fmorehelp%2Fdocumentation.htm (can't seem to download it anywhere). Will I need the 2008 version to make this work?

Thanks in advance!

Regards,
Søren
Posted 14 years ago by Søren Erbs Poulsen
I managed to resolve some of the issues myself but I am left with the following errors:

1>------ Rebuild All started: Project: ifm, Configuration: Debug X64 ------
1>Build started 22-02-2011 10:08:16.
1>_PrepareForClean:
1>  Deleting file "X64\Debug\ifm.lastbuildstate".
1>InitializeBuildStatus:
1>  Creating "X64\Debug\ifm.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1>  ifc_pch.c
1>  ifc_alloc.c
1>  ifc_amr.c
1>  ifc_archive.c
1>  ifc_assert.c
1>  ifc_bc.c
1>  ifc_bcc.c
1>  ifc_bhe.c
1>  ifc_budg.c
1>  ifc_compat.c
1>  ifc_content.c
1>  ifc_ctrl.c
1>  ifc_diagram.c
1>  ifc_file.c
1>  ifc_fracs.c
1>  ifc_graphic.c
1>  ifc_grp.c
1>  ifc_mat.c
1>  ifc_module.c
1>  ifc_obs.c
1>  ifc_power.c
1>  ifc_profile.c
1>  ifc_refdistr.c
1>  ifc_regio.c
1>  ifc_res.c
1>  ifc_strings.c
1>  ifc_time.c
1>  ifc_topo.c
1>  ifc_win32.c
1>  ifc_xdk.c
1>Lib:
1>  ifm.vcxproj -> C:\Users\Public\Documents\WASY FEFLOW 6.0\sdk\ifm\lib\vc10\X64\Debug\ifm.lib
1>FinalizeBuildStatus:
1>  Deleting file "X64\Debug\ifm.unsuccessfulbuild".
1>  Touching "X64\Debug\ifm.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:01.34
2>------ Rebuild All started: Project: TVBC, Configuration: Debug X64 ------
2>Build started 22-02-2011 10:08:18.
2>_PrepareForClean:
2>  Deleting file "X64\Debug\TVBC.lastbuildstate".
2>InitializeBuildStatus:
2>  Touching "X64\Debug\TVBC.unsuccessfulbuild".
2>ClCompile:
2>  TVBC.cpp
2>Link:
2>  TVBC.vcxproj -> C:\Users\Public\Documents\WASY FEFLOW 6.0\TVBC\X64\Debug\TVBC.dll
2>Manifest:
2>  Deleting file "X64\Debug\TVBC.dll.embed.manifest".
2>LinkEmbedManifest:
2>  TVBC.vcxproj -> C:\Users\Public\Documents\WASY FEFLOW 6.0\TVBC\X64\Debug\TVBC.dll
2>PostBuildEvent:
2>  Description: Registering IFM plug-in...
2>  *** FEFLOW Error ***
2>    Invalid registration procedure: "RegisterModule"!
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command ""C:\Program Files\WASY\FEFLOW 6.0\\bin64\feflow60c.exe" -ifmregister -module "C:\Users\Public\Documents\WASY FEFLOW 6.0\TVBC\X64\Debug\TVBC.dll"
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd" exited with code 1.
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:01.09
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

Apparently the module will not register. I tried to remove the double slash and the doube quote in this string ""C:\Program Files\WASY\FEFLOW 6.0\\bin64\feflow60c.exe" in Properties->Build events->Post Build events (in VC++) but with no result.

Regards,
Søren
Posted 14 years ago by Alexander Renz
Dear Søren,
Check if the dll has been succesfully created and - if yes - to manually register it in FEFLOW. The automatic registration of the plug-in is only a convenience feature that is run after the actual compiling step.
Alex
Posted 14 years ago by Søren Erbs Poulsen
Thanks Alexander.

The dll is created but I get the following errormessage "Invalid registration procedure: "RegisterModule"!" in FEFLOW (both Classic and the new version) when trying to load the dll as a module. The problem occurs when compiling both 32 and 64 bit using VC++ 2010 and using the FEFLOW IFM template as described in the manual. Manual registration using the command prompt yields the same error.
Posted 14 years ago by hidromatrix
I'm having the same issue in the same problem. Old 32bits VS2008 plugin, now trying to compile on VS2010 with Windows 7 64bits.

My DLL is built but I'm not able to register it even manually.

Cheers,

Eduardo
Posted 14 years ago by Denim Umeshkumar Anajwala
We have tracked down the problem now. Reason for the difficulties is a missing entry in the [i]Linker[/i] > [i]Input[/i] section in the [i]Configuration Properties[/i] of the VC++ 2010 project settings. For new plug-ins set up via the wizard in VC++ 2010, this will be fixed with the next FEFLOW patch 6.06. In the meanwhile and for existing projects, simply add the [i]Module Definition File[/i] manually as shown in the attached screenshot.
Posted 14 years ago by Søren Erbs Poulsen
Thanks Peter!

You must be signed in to post in this forum.