Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. __ftol2 ?? where did it come from? .NET?

__ftol2 ?? where did it come from? .NET?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++comhelptutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jared Allen
    wrote on last edited by
    #1

    Ok i just got the windows media DRM SDK delivered to me from MS. I added it into my project and now i get a linker error. error LNK2001: unresolved external symbol __ftol2 I also updated my MS Platform SDK a few dats ago (while i was trying to get a copy of the internet SDK , i didn't even want the upgrade) I've searched and heard that __ftol2 may have something to do with managed C++ and or .NET , can anyone tell me how to get around this. thanks. Jared Allen. www.chironexsoftware.com

    J 1 Reply Last reply
    0
    • J Jared Allen

      Ok i just got the windows media DRM SDK delivered to me from MS. I added it into my project and now i get a linker error. error LNK2001: unresolved external symbol __ftol2 I also updated my MS Platform SDK a few dats ago (while i was trying to get a copy of the internet SDK , i didn't even want the upgrade) I've searched and heard that __ftol2 may have something to do with managed C++ and or .NET , can anyone tell me how to get around this. thanks. Jared Allen. www.chironexsoftware.com

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      Seems like the library you're trying to use is targeted at VC++ 7.0: a search on Usenet reveals that __ftol is an internal library of VC++ 7.0's C run-time library. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      C 1 Reply Last reply
      0
      • J Joaquin M Lopez Munoz

        Seems like the library you're trying to use is targeted at VC++ 7.0: a search on Usenet reveals that __ftol is an internal library of VC++ 7.0's C run-time library. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #3

        _ftol is a function invoked when you do a double to long typecast. it's inserted automatically by the compiler:

        ; 38 :
        ; 39 : double t = 100.23;

        mov	DWORD PTR \_t$\[ebp\], 1374389535		; 51eb851fH
        mov	DWORD PTR \_t$\[ebp+4\], 1079578296	; 40590eb8H
        

        ; 40 : int l = t;

        fld	QWORD PTR \_t$\[ebp\]
        call	\_\_ftol
        mov	DWORD PTR \_l$\[ebp\], eax
        

        i'm not sure what _ftol2 is about, but i suspect it's a .Net thing. i see it when i accidentally try to mix VC6 and VC7 .obj files. -c


        Get there first with something patented, proprietary, and broken, then send lawyers after anyone who points out problems. --- Peter Gutmann

        Fractals

        J 1 Reply Last reply
        0
        • C Chris Losinger

          _ftol is a function invoked when you do a double to long typecast. it's inserted automatically by the compiler:

          ; 38 :
          ; 39 : double t = 100.23;

          mov	DWORD PTR \_t$\[ebp\], 1374389535		; 51eb851fH
          mov	DWORD PTR \_t$\[ebp+4\], 1079578296	; 40590eb8H
          

          ; 40 : int l = t;

          fld	QWORD PTR \_t$\[ebp\]
          call	\_\_ftol
          mov	DWORD PTR \_l$\[ebp\], eax
          

          i'm not sure what _ftol2 is about, but i suspect it's a .Net thing. i see it when i accidentally try to mix VC6 and VC7 .obj files. -c


          Get there first with something patented, proprietary, and broken, then send lawyers after anyone who points out problems. --- Peter Gutmann

          Fractals

          J Offline
          J Offline
          Jared Allen
          wrote on last edited by
          #4

          Any idea how to get around it without using VC++ 7.0 ? The problem is I have a .lib file that references it, and i don't have the source. It's from MS I've tried to define the function __ftol long __ftol2(float x) { return (long)x; } But i still get the link problem, i think i'm putting it in the wrong place? put i should be able to have it in any .cpp file of the project? Jared Allen. www.chironexsoftware.com

          C 1 Reply Last reply
          0
          • J Jared Allen

            Any idea how to get around it without using VC++ 7.0 ? The problem is I have a .lib file that references it, and i don't have the source. It's from MS I've tried to define the function __ftol long __ftol2(float x) { return (long)x; } But i still get the link problem, i think i'm putting it in the wrong place? put i should be able to have it in any .cpp file of the project? Jared Allen. www.chironexsoftware.com

            C Offline
            C Offline
            Chris Losinger
            wrote on last edited by
            #5

            sorry , i don't know. i always fix it with a rebuild-all, but since i'm not using any libs that i don't have the source to, there's no problem once everything is rebuilt with the same compiler. -c


            Get there first with something patented, proprietary, and broken, then send lawyers after anyone who points out problems. --- Peter Gutmann

            Fractals

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups