#84 using NVIDIA Cg fails


We are trying to generate a 64 bit build with NVIDIA Cg.

This used to work with 32 bit mingw (and an older set of libraries)

This now work with Visual Studio x64

But fails with Mingw 64 bit at run time: the first call of a cg function results in a crash.

Rebuilding Cg example as supplied by NVIDIA lead to similar crash.

Any idea how to solve this?



  • Klamer Schutte

    Klamer Schutte - 2013-01-22

    When compiling the Cg example against NVIDIA's supplied bin.64/*.dll the code seems to work, where it fails against NVIDIA's supplied lib.x64/*.lib .

    This seems to fix my problem -- allthough I cannot find any queue in documentation WHY this helps my problem. Visual Studio directed .LIB files should be useable with MINGW64? Note that other library seem to follow the name@number nam convention where this is not the case for the NVIDIA .LIB files -- has that to do with this problem?

  • Ozkan Sezer

    Ozkan Sezer - 2013-01-23

    I think you are trying to link using an MSVC-generated x64 *.lib file
    which is _not_ supported. Yes the x86 variant is supported but x64 is
    not, and yes binutils will be silent and link but will output an all
    wrong binary. Someone should put this in a FAQ. See, e.g. another
    thread here:
    If you generate a binutils-compatbile *.a file by using gendef on the
    dll and then compiling it, like:
    gendef wpcap.dll
    dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libwpcap.a --input-def wpcap.def
    ... then things will work.

  • Klamer Schutte

    Klamer Schutte - 2013-01-23

    sezero: thanks, seem to work!

  • Ozkan Sezer

    Ozkan Sezer - 2013-01-23

    Thanks for adding this to the FAQ.

  • Ozkan Sezer

    Ozkan Sezer - 2013-01-23
    • status: open --> closed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks