You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by gmic21 June 28, 2024
I have built a CGNS DLL using v4.3.0 and cmake. When I go to link to my program I get missing symbols that existed in prior CGNS version DLL, which I had built with configure and nmake. I have verified the absence of the symbold in the v4.3.0 DLL build and their presence in the prior version DLL build with dependency walker so this is not a calling name issue. The symbols in question are all FORTRAN callable CG_*_F symbols such as CG_NBASES_F, CG_NCOORDS_F, CG_NSECTIONS_F etc.
When I build the CGNS DLL I get the following output in MSVS 2022 project generated by cmake
Build started at 11:49 AM...
1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------
1>1>Checking Build System
2>------ Build started: Project: cgns_f2c (IFORT), Configuration: Release x64 ------
Compiling with Intel® Fortran Compiler Classic 2021.9.0 [Intel(R) 64]...
cgns_f.F90
Creating library...
Build log written to "file://{deleted}/cgns/cgnslib_4.3.0/Release/src/cgns_f2c.dir/Release/BuildLog.htm"
cgns_f2c - 0 error(s), 0 warning(s)
3>------ Build started: Project: cgns_shared, Configuration: Release x64 ------
3>Building Custom Rule {deleted}/cgns/cgnslib_4.3.0/src/CMakeLists.txt
3>cl : command line warning D9002: ignoring unknown option '/fpp'
3>cl : command line warning D9002: ignoring unknown option '/libs:dll'
3>cl : command line warning D9002: ignoring unknown option '/threads'
3>cgns_error.c
3>cgns_internals.c
3>cgns_io.c
3>cgnslib.c
3>cg_hashmap.c
3>ADF_interface.c
3>ADF_internals.c
3>ADFH.c
3>Generating Code...
3>{deleted}\cgns\cgnslib_4.3.0\src\adfh\ADFH.c(2253,1): warning C4700: uninitialized local variable 'bkg' used
3>{deleted}\cgns\cgnslib_4.3.0\src\adfh\ADFH.c(2253,1): warning C4700: uninitialized local variable 'tconv' used
3>{deleted}\cgns\cgnslib_4.3.0\src\adfh\ADFH.c(2342,1): warning C4700: uninitialized local variable 'bkg' used
3>{deleted}\cgns\cgnslib_4.3.0\src\adfh\ADFH.c(2342,1): warning C4700: uninitialized local variable 'tconv' used
3>cl : command line warning D9002: ignoring unknown option '/fpp'
3>cl : command line warning D9002: ignoring unknown option '/libs:dll'
3>cl : command line warning D9002: ignoring unknown option '/threads'
3>cg_ftoc.c
3>cgio_ftoc.c
3>Generating Code...
3> Creating library {deleted}/cgns/cgnslib_4.3.0/Release/src/Release/cgnsdll.lib and object {deleted}/cgns/cgnslib_4.3.0/Release/src/Release/cgnsdll.exp
3>cgns_shared.vcxproj -> {deleted}\cgns\cgnslib_4.3.0\Release\src\Release\cgnsdll.dll
3>Done building project "cgns_shared.vcxproj".
========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 11:49 AM and took 05.519 seconds ==========
CG_NBASES_F is in cg_ftoc.c and the binding to the FORTRAN call is in cgns_f.F90, both of which get built and, presumably, linked. Here is an image of the cgns_f.obj file being included in the object libraries for the cgns_shared project and the source cg_ftoc.c is there as well.
Yet, CG_NBASES_F is not there
How could these symbols not be in the resulting DLL?
The text was updated successfully, but these errors were encountered:
We need to move away from calling the C _f wrappers.
I've changed cg_nbases in the F2008 branch to call the C API directly. Can you try this change to see if it at least fixes cg_nbases? If so, we need to do a lot of the same.
Everything seems to compile fine. I try to compile my application and it cannot find cgnslib_f.h. This makes sense because it was not configured in the src directory. So I run configure in that src dir and that header file gets created. But if I try to rebuild CGNS as above I get a slew compilation errors. Here is a file of the output.
So I punted. I tried simply commenting out the cg_nbases_f INTERFACE definition in cgns_f.F90 and I had to shut off generation of the tests or it complains that it cannot find cg_nbases_f, which gave me a sinking feeling. Sure enough linking with my application still shows that the cg_nbases_f symbol is not found. I tried to capitalize the call in my FORTRAN code, being pretty sure this would not affect anything, and indeed it still does not find the symbol cg_nbases_f.
BTW, on line 1702 column 36 of configure.bat in src directory there is a '.' when there should be a ','. Should I open a separate thread to report this?
Discussed in #768
Originally posted by gmic21 June 28, 2024
I have built a CGNS DLL using v4.3.0 and cmake. When I go to link to my program I get missing symbols that existed in prior CGNS version DLL, which I had built with configure and nmake. I have verified the absence of the symbold in the v4.3.0 DLL build and their presence in the prior version DLL build with dependency walker so this is not a calling name issue. The symbols in question are all FORTRAN callable CG_*_F symbols such as CG_NBASES_F, CG_NCOORDS_F, CG_NSECTIONS_F etc.
When I build the CGNS DLL I get the following output in MSVS 2022 project generated by cmake
Build started at 11:49 AM...
1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------
1>1>Checking Build System
2>------ Build started: Project: cgns_f2c (IFORT), Configuration: Release x64 ------
Compiling with Intel® Fortran Compiler Classic 2021.9.0 [Intel(R) 64]...
cgns_f.F90
Creating library...
Build log written to "file://{deleted}/cgns/cgnslib_4.3.0/Release/src/cgns_f2c.dir/Release/BuildLog.htm"
cgns_f2c - 0 error(s), 0 warning(s)
3>------ Build started: Project: cgns_shared, Configuration: Release x64 ------
3>Building Custom Rule {deleted}/cgns/cgnslib_4.3.0/src/CMakeLists.txt
3>cl : command line warning D9002: ignoring unknown option '/fpp'
3>cl : command line warning D9002: ignoring unknown option '/libs:dll'
3>cl : command line warning D9002: ignoring unknown option '/threads'
3>cgns_error.c
3>cgns_internals.c
3>cgns_io.c
3>cgnslib.c
3>cg_hashmap.c
3>ADF_interface.c
3>ADF_internals.c
3>ADFH.c
3>Generating Code...
3>{deleted}\cgns\cgnslib_4.3.0\src\adfh\ADFH.c(2253,1): warning C4700: uninitialized local variable 'bkg' used
3>{deleted}\cgns\cgnslib_4.3.0\src\adfh\ADFH.c(2253,1): warning C4700: uninitialized local variable 'tconv' used
3>{deleted}\cgns\cgnslib_4.3.0\src\adfh\ADFH.c(2342,1): warning C4700: uninitialized local variable 'bkg' used
3>{deleted}\cgns\cgnslib_4.3.0\src\adfh\ADFH.c(2342,1): warning C4700: uninitialized local variable 'tconv' used
3>cl : command line warning D9002: ignoring unknown option '/fpp'
3>cl : command line warning D9002: ignoring unknown option '/libs:dll'
3>cl : command line warning D9002: ignoring unknown option '/threads'
3>cg_ftoc.c
3>cgio_ftoc.c
3>Generating Code...
3> Creating library {deleted}/cgns/cgnslib_4.3.0/Release/src/Release/cgnsdll.lib and object {deleted}/cgns/cgnslib_4.3.0/Release/src/Release/cgnsdll.exp
3>cgns_shared.vcxproj -> {deleted}\cgns\cgnslib_4.3.0\Release\src\Release\cgnsdll.dll
3>Done building project "cgns_shared.vcxproj".
========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 11:49 AM and took 05.519 seconds ==========
CG_NBASES_F is in cg_ftoc.c and the binding to the FORTRAN call is in cgns_f.F90, both of which get built and, presumably, linked. Here is an image of the cgns_f.obj file being included in the object libraries for the cgns_shared project and the source cg_ftoc.c is there as well.
Yet, CG_NBASES_F is not there
How could these symbols not be in the resulting DLL?
The text was updated successfully, but these errors were encountered: