<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem with linking to library in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898539#M80244</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Can you attach the buildlog.htm from the failed build?&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;The buildlog.htm follows:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Build Log  &lt;BR /&gt; Build started: Project: BW_test, Configuration: Release|Win32 &lt;BR /&gt; &lt;BR /&gt;Output  &lt;BR /&gt; Deleting intermediate files and output files for project 'BW_test', configuration 'Release|Win32'.&lt;BR /&gt;Compiling with Intel Visual Fortran 11.0.074 [IA-32]...&lt;BR /&gt;ifort /nologo /module:"Release" /object:"Release" /libs:static /threads /dbglibs /c /Qvc9 /Qlocation,link,"C:Program Files (x86)Microsoft Visual Studio 9.0VCbin" "C:NVIDIA CUDA SDKprojectsCUDA_libBW_testSource1.F90"&lt;BR /&gt;Linking...&lt;BR /&gt;Link /OUT:"ReleaseBW_test.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:NVIDIA CUDA SDKprojectsCUDA_libRelease" /MANIFEST /MANIFESTFILE:"C:NVIDIA CUDA SDKprojectsCUDA_libBW_testreleasebw_test.exe.intermediate.manifest" /SUBSYSTEM:CONSOLE /IMPLIB:"C:NVIDIA CUDA SDKprojectsCUDA_libBW_testreleasebw_test.lib" C_lib.lib "ReleaseSource1.obj"&lt;BR /&gt;Link: executing 'link'&lt;BR /&gt;LINK : fatal error LNK1181: cannot open input file 'C_lib.lib'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BW_test - 1 error(s), 0 warning(s)&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 21 May 2009 14:51:27 GMT</pubDate>
    <dc:creator>Alessandro</dc:creator>
    <dc:date>2009-05-21T14:51:27Z</dc:date>
    <item>
      <title>Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898537#M80242</link>
      <description>I'm trying to call some CUDA routines from Fortran. I'm using Visual Studio 2008 professional under Windows XP 64bit. I created a C static library with the C source, and I can build it, so that I have a .lib file somewhere on my hard disk. Then I try to link this .lib from a Fortran program, but it tells me:&lt;BR /&gt;&lt;BR /&gt;Error	1	 fatal error LNK1181: cannot open input file 'C_lib.lib'	LINK	&lt;BR /&gt;&lt;BR /&gt;I put the exact path where the file C_lib.lib is in the tab Linker -&amp;gt; General -&amp;gt; Additional Library Directories, and I put C_lib.lib in the tab Linker -&amp;gt; Input -&amp;gt; Additional dependencies.&lt;BR /&gt;&lt;BR /&gt;I commented the call to the routines contained in the library, so that actually in the Fortran code there aren't any calls to the library, and the problem seems to be exactly in linking the .lib file. &lt;BR /&gt;&lt;BR /&gt;Could you please help me? Thank you.&lt;BR /&gt;&lt;BR /&gt;Alessandro&lt;BR /&gt;</description>
      <pubDate>Thu, 21 May 2009 09:58:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898537#M80242</guid>
      <dc:creator>Alessandro</dc:creator>
      <dc:date>2009-05-21T09:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898538#M80243</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Can you attach the buildlog.htm from the failed build?&lt;BR /&gt;</description>
      <pubDate>Thu, 21 May 2009 14:10:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898538#M80243</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-05-21T14:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898539#M80244</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Can you attach the buildlog.htm from the failed build?&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;The buildlog.htm follows:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Build Log  &lt;BR /&gt; Build started: Project: BW_test, Configuration: Release|Win32 &lt;BR /&gt; &lt;BR /&gt;Output  &lt;BR /&gt; Deleting intermediate files and output files for project 'BW_test', configuration 'Release|Win32'.&lt;BR /&gt;Compiling with Intel Visual Fortran 11.0.074 [IA-32]...&lt;BR /&gt;ifort /nologo /module:"Release" /object:"Release" /libs:static /threads /dbglibs /c /Qvc9 /Qlocation,link,"C:Program Files (x86)Microsoft Visual Studio 9.0VCbin" "C:NVIDIA CUDA SDKprojectsCUDA_libBW_testSource1.F90"&lt;BR /&gt;Linking...&lt;BR /&gt;Link /OUT:"ReleaseBW_test.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:NVIDIA CUDA SDKprojectsCUDA_libRelease" /MANIFEST /MANIFESTFILE:"C:NVIDIA CUDA SDKprojectsCUDA_libBW_testreleasebw_test.exe.intermediate.manifest" /SUBSYSTEM:CONSOLE /IMPLIB:"C:NVIDIA CUDA SDKprojectsCUDA_libBW_testreleasebw_test.lib" C_lib.lib "ReleaseSource1.obj"&lt;BR /&gt;Link: executing 'link'&lt;BR /&gt;LINK : fatal error LNK1181: cannot open input file 'C_lib.lib'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BW_test - 1 error(s), 0 warning(s)&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 21 May 2009 14:51:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898539#M80244</guid>
      <dc:creator>Alessandro</dc:creator>
      <dc:date>2009-05-21T14:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898540#M80245</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
And are you very sure that C_lib.lib exists in C:NVIDIA CUDA SDKprojectsCUDA_libRelease and that it is a valid library? Can you show a directory listing of that folder?&lt;BR /&gt;</description>
      <pubDate>Thu, 21 May 2009 16:19:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898540#M80245</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-05-21T16:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898541#M80246</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; And are you very sure that C_lib.lib exists in C:NVIDIA CUDA SDKprojectsCUDA_libRelease and that it is a valid library? Can you show a directory listing of that folder?&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Yes, the file exists, but I don't know if it is a valid library, how can I check it?&lt;BR /&gt;&lt;BR /&gt;If I change and compile in Debug mode it can find the library, but when I add the call to a routine it cannot resolve it:&lt;BR /&gt;&lt;BR /&gt;Error	1	 error LNK2019: unresolved external symbol _Maincuda referenced in function _MAIN__	Source1.obj	&lt;BR /&gt;&lt;BR /&gt;The fortran main code contains the following:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; INTERFACE TO SUBROUTINE maincuda [C,ALIAS:'_Maincuda'] (argc,argv)&lt;BR /&gt; integer argc [VALUE]&lt;BR /&gt; character argv [VALUE]&lt;BR /&gt; END&lt;BR /&gt;&lt;BR /&gt; integer argc&lt;BR /&gt; character argv&lt;BR /&gt;&lt;BR /&gt; call maincuda(argc,argv)&lt;BR /&gt; &lt;BR /&gt; end&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The maincuda is defined in the library as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;void&lt;BR /&gt;Maincuda(int argc, char** argv) &lt;BR /&gt;{&lt;BR /&gt; runTest(argc, (const char**)argv);&lt;BR /&gt; cutilExit(argc, argv);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 21 May 2009 16:56:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898541#M80246</guid>
      <dc:creator>Alessandro</dc:creator>
      <dc:date>2009-05-21T16:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898542#M80247</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Oh, yuck. Fortran PowerStation INTERFACE TO.&lt;BR /&gt;&lt;BR /&gt;First, that the linker doesn't complain about the library in a Debug configuration suggests that either you have set the linker properties correctly for Debug but not for Release, or that you didn't add the library at all to Debug so the linker never looks for it.&lt;BR /&gt;&lt;BR /&gt;To see what symbols are in a library, start a Fortran Build Environment command prompt window, set default (cd) to the folder with the library and type:&lt;BR /&gt;&lt;BR /&gt;dumpbin -symbols C_lib.lib &amp;gt; c_lib.txt&lt;BR /&gt;&lt;BR /&gt;Now open c_lib.txt and you'll see all the symbols listed. You can also do this on an object file.&lt;BR /&gt;</description>
      <pubDate>Thu, 21 May 2009 18:34:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898542#M80247</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-05-21T18:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898543#M80248</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Oh, yuck. Fortran PowerStation INTERFACE TO.&lt;BR /&gt;&lt;BR /&gt;First, that the linker doesn't complain about the library in a Debug configuration suggests that either you have set the linker properties correctly for Debug but not for Release, or that you didn't add the library at all to Debug so the linker never looks for it.&lt;BR /&gt;&lt;BR /&gt;To see what symbols are in a library, start a Fortran Build Environment command prompt window, set default (cd) to the folder with the library and type:&lt;BR /&gt;&lt;BR /&gt;dumpbin -symbols C_lib.lib &amp;gt; c_lib.txt&lt;BR /&gt;&lt;BR /&gt;Now open c_lib.txt and you'll see all the symbols listed. You can also do this on an object file.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;These are the lines in c_lib.txt where maincuda appears:&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;Section length   1F, #relocs    2, #linenums    0, checksum CEFEC89B, selection    1 (pick no duplicates)&lt;BR /&gt;248 00000000 SECTB1 notype ()    External     | ?Maincuda@@YAXHPEAPEAD@Z (void __cdecl Maincuda(int,char * *))&lt;BR /&gt;249 00000000 SECTB2 notype       Static       | .pdata&lt;BR /&gt; Section length    C, #relocs    3, #linenums    0, checksum A59B2387, selection    5 (pick associative Section 0xB1)&lt;BR /&gt;24B 00000000 SECTB2 notype       Static       | $pdata$?Maincuda@@YAXHPEAPEAD@Z&lt;BR /&gt;24C 00000000 SECTB3 notype       Static       | .xdata&lt;BR /&gt; Section length    C, #relocs    0, #linenums    0, checksum 2559CD25, selection    5 (pick associative Section 0xB1)&lt;BR /&gt;24E 00000000 SECTB3 notype       Static       | $unwind$?Maincuda@@YAXHPEAPEAD@Z&lt;BR /&gt;24F 00000000 SECTB1 notype       Label        | $LN4&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;How should I use the ouput of the command dumpbin?&lt;BR /&gt;</description>
      <pubDate>Fri, 22 May 2009 09:50:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898543#M80248</guid>
      <dc:creator>Alessandro</dc:creator>
      <dc:date>2009-05-22T09:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898544#M80249</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Oh dear. Maincuda is C++ and has the C++ "name mangling" applied.&lt;BR /&gt;&lt;BR /&gt;Try this as a replacement for your INTERFACE TO block.&lt;BR /&gt;&lt;BR /&gt;INTERFACE&lt;BR /&gt; SUBROUTINE Maincuda (argc, argv)&lt;BR /&gt; !DEC$ ATTRIBUTES C, ALIAS:"?Maincuda@@YAXHPEAPEAD@Z" :: Maincuda&lt;BR /&gt; INTEGER argc&lt;BR /&gt;INTEGER(INT_PTR_KIND()), DIMENSION(*) :: argv&lt;BR /&gt;END SUBROUTINE Maincuda&lt;BR /&gt;END INTERFACE&lt;BR /&gt;&lt;BR /&gt;I'm not sure what you are passing for argv - it is certainly not a single character. I believe that the correct value is an array of pointers to null-terminated strings.&lt;BR /&gt;</description>
      <pubDate>Fri, 22 May 2009 12:46:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898544#M80249</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-05-22T12:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898545#M80250</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Oh dear. Maincuda is C++ and has the C++ "name mangling" applied.&lt;BR /&gt;&lt;BR /&gt;Try this as a replacement for your INTERFACE TO block.&lt;BR /&gt;&lt;BR /&gt;INTERFACE&lt;BR /&gt; SUBROUTINE Maincuda (argc, argv)&lt;BR /&gt; !DEC$ ATTRIBUTES C, ALIAS:"?Maincuda@@YAXHPEAPEAD@Z" :: Maincuda&lt;BR /&gt; INTEGER argc&lt;BR /&gt;INTEGER(INT_PTR_KIND()), DIMENSION(*) :: argv&lt;BR /&gt;END SUBROUTINE Maincuda&lt;BR /&gt;END INTERFACE&lt;BR /&gt;&lt;BR /&gt;I'm not sure what you are passing for argv - it is certainly not a single character. I believe that the correct value is an array of pointers to null-terminated strings.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Actually I don't know how to manage it. This is something I'm trying to do with the working examples I have from CUDA, since I need to interface my Fortran code to CUDA. Then the maincuda was in origin the main of the C++ program, and I only changed the name from "main" to "maincuda", willing to call it from a Fortran program. &lt;BR /&gt;Can you maybe show me a Fortran program which can call the following C++ code:&lt;BR /&gt;&lt;BR /&gt;void Maincuda(int argc, char** argv) &lt;BR /&gt;{		&lt;BR /&gt; runTest(argc, (const char**)argv);&lt;BR /&gt; cutilExit(argc, argv);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;And, considering that the Maincuda and all the routines should be contained in the library C_lib.lib (supposing that I compiled the library correctly), how would you compile and link it? Maybe this is the easiest way to understand what I should do in order to use CUDA.&lt;BR /&gt;&lt;BR /&gt;Hope you can help me. Thank you.&lt;BR /&gt;&lt;BR /&gt;Alessandro&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 May 2009 14:08:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898545#M80250</guid>
      <dc:creator>Alessandro</dc:creator>
      <dc:date>2009-05-22T14:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898546#M80251</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
I don't think you want to "call" maincuda. The sample you were provided has a C++ main program which, I assume, calls some CUDA routines. You want to replace the C++ main, not call it. It may be that you need to create some jacket C++ routine that does the CUDA stuff and call it, but not try to make it look like a "main". I assume that the sample you were shown doesn't actually do anything with argc and argv - those are standard arguments to a C/C++ main program.&lt;BR /&gt;&lt;BR /&gt;In any event, if you write some C++ code you want to call from Fortran, be sure to prefix the declaration of it in the C++ side with 'extern "C"' to avoid name mangling.&lt;BR /&gt;</description>
      <pubDate>Fri, 22 May 2009 15:23:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898546#M80251</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-05-22T15:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898547#M80252</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; I don't think you want to "call" maincuda. The sample you were provided has a C++ main program which, I assume, calls some CUDA routines. You want to replace the C++ main, not call it. It may be that you need to create some jacket C++ routine that does the CUDA stuff and call it, but not try to make it look like a "main". I assume that the sample you were shown doesn't actually do anything with argc and argv - those are standard arguments to a C/C++ main program.&lt;BR /&gt;&lt;BR /&gt;In any event, if you write some C++ code you want to call from Fortran, be sure to prefix the declaration of it in the C++ side with 'extern "C"' to avoid name mangling.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;And how can I replace the c++ main? I suppose I want a Fortran main which calls runTest and cutilExit, but I'd like to see an example on how to do it. &lt;BR /&gt;</description>
      <pubDate>Fri, 22 May 2009 15:32:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898547#M80252</guid>
      <dc:creator>Alessandro</dc:creator>
      <dc:date>2009-05-22T15:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with linking to library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898548#M80253</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Sorry, I'm not familiar with the CUDA software and its use. You may want to study samples of calling C from Fortran.&lt;BR /&gt;</description>
      <pubDate>Fri, 22 May 2009 16:54:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-linking-to-library/m-p/898548#M80253</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-05-22T16:54:12Z</dc:date>
    </item>
  </channel>
</rss>

